Skip to content

Commit

Permalink
Adding scanner results (threat9#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyoa authored and fwkz committed Mar 11, 2017
1 parent 513b53d commit 264c4c6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions routersploit/modules/scanners/autopwn.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,31 @@ class Exploit(exploits.Exploit):

def __init__(self):
self.vulnerabilities = []
self.not_verified = []
self._exploits_directory = path.join(utils.EXPLOITS_DIR, self.vendor)

def run(self):
self.vulnerabilities = []
self.not_verified = []

with threads.ThreadPoolExecutor(self.threads) as executor:
for exploit in utils.iter_modules(self._exploits_directory):
executor.submit(self.target_function, exploit)

print_info()
if self.not_verified:
print_status("Could not verify exploitability:")
for v in self.not_verified:
print_info(" - {}".format(v))

print_info()
if self.vulnerabilities:
print_success("Device is vulnerable!")
print_success("Device is vulnerable:")
for v in self.vulnerabilities:
print_info(" - {}".format(v))
print_info()
else:
print_error("Device is not vulnerable to any exploits!\n")
print_error("Could not confirm any vulnerablity\n")

def check(self):
raise NotImplementedError("Check method is not available")
Expand All @@ -71,3 +79,4 @@ def target_function(self, exploit):
print_error("{} is not vulnerable".format(exploit))
else:
print_status("{} could not be verified".format(exploit))
self.not_verified.append(exploit)

0 comments on commit 264c4c6

Please sign in to comment.