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:
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
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 *