From 1ad765fb9a3cef71acdd69c369507b130cde12ab Mon Sep 17 00:00:00 2001 From: Shivam Sah <79564534+shivam-0806@users.noreply.github.com> Date: Sun, 22 Dec 2024 00:37:45 +0530 Subject: [PATCH 1/3] peda.py --- peda.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/peda.py b/peda.py index 14a7f5e..f1b1315 100644 --- a/peda.py +++ b/peda.py @@ -27,15 +27,7 @@ # Use six library to provide Python 2/3 compatibility import six -from six.moves import range -from six.moves import input -try: - import six.moves.cPickle as pickle -except ImportError: - import pickle - - - +import pickle from skeleton import * from shellcode import * from utils import * From ff5857520b13e937a3b9d0666748adb1fcffa29d Mon Sep 17 00:00:00 2001 From: Shivam Sah <79564534+shivam-0806@users.noreply.github.com> Date: Sun, 22 Dec 2024 00:55:24 +0530 Subject: [PATCH 2/3] shellcode.py --- lib/shellcode.py | 65 +++--------------------------------------------- 1 file changed, 3 insertions(+), 62 deletions(-) diff --git a/lib/shellcode.py b/lib/shellcode.py index 6b87b0d..22e74ac 100644 --- a/lib/shellcode.py +++ b/lib/shellcode.py @@ -14,8 +14,7 @@ import socket import struct import traceback -import six.moves.http_client -from six.moves import range +import six import sys import config @@ -305,67 +304,9 @@ def shellcode(self, sctype, port=None, host=None): return None """ search() and display() use the shell-storm API """ - def search(self, keyword): - if keyword is None: - return None - try: - msg("Connecting to shell-storm.org...") - s = six.moves.http_client.HTTPConnection("shell-storm.org") - - s.request("GET", "/api/?s="+str(keyword)) - res = s.getresponse() - read_result = res.read().decode('utf-8') - data_l = [x for x in read_result.split('\n') if x] # remove empty results - except Exception as e: - if config.Option.get("debug") == "on": - msg("Exception: %s" %e) - traceback.print_exc() - error_msg("Cannot connect to shell-storm.org") - return None - - data_dl = [] - for data in data_l: - try: - desc = data.split("::::") - dico = { - 'ScAuthor': desc[0], - 'ScArch': desc[1], - 'ScTitle': desc[2], - 'ScId': desc[3], - 'ScUrl': desc[4] - } - data_dl.append(dico) - except Exception as e: - if config.Option.get("debug") == "on": - msg("Exception: %s" %e) - traceback.print_exc() - - return data_dl - - def display(self, shellcodeId): - if shellcodeId is None: - return None - - try: - msg("Connecting to shell-storm.org...") - s = six.moves.http_client.HTTPConnection("shell-storm.org") - except: - error_msg("Cannot connect to shell-storm.org") - return None - - try: - s.request("GET", "/shellcode/files/shellcode-"+str(shellcodeId)+".php") - res = s.getresponse() - data = res.read().decode('utf-8').split("
")[1].split("")[0]
- except:
- error_msg("Failed to download shellcode from shell-storm.org")
- return None
+
- data = data.replace(""", "\"")
- data = data.replace("&", "&")
- data = data.replace("<", "<")
- data = data.replace(">", ">")
- return data
+
#OWASP ZSC API Z3r0D4y.Com
def zsc(self,os,job,encode):
try:
From 30ea0000d7f805bb739d033c6d5240c7ff766e71 Mon Sep 17 00:00:00 2001
From: Shivam Sah <79564534+shivam-0806@users.noreply.github.com>
Date: Sun, 22 Dec 2024 00:56:51 +0530
Subject: [PATCH 3/3] utils.py
---
lib/utils.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/utils.py b/lib/utils.py
index 8f2b038..7ee91b1 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -25,8 +25,7 @@
import six
from six import StringIO
-from six.moves import range
-from six.moves import input
+
# http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize
# http://stackoverflow.com/questions/8856164/class-decorator-decorating-method-in-python