Commit 8631b17b by fwkz

Summary of threaded autopwn

parent 327cfff9
......@@ -4,8 +4,9 @@ from routersploit import (
print_error,
print_success,
print_status,
print_info,
utils,
LockedIterator
LockedIterator,
)
......@@ -33,8 +34,17 @@ class Exploit(exploits.Exploit):
def run(self):
data = LockedIterator(utils.iter_modules(utils.EXPLOITS_DIR))
self.vulnerabilities = []
self.run_threads(self.threads, self.target_function, data)
if self.vulnerabilities:
print_info()
print_success("Device is vulnerable!")
for v in self.vulnerabilities:
print_info(" - {}".format(v))
else:
print_error("Device is not vulnerable to any exploits!\n")
def check(self):
raise NotImplementedError("Check method is not available")
......@@ -56,6 +66,7 @@ class Exploit(exploits.Exploit):
if response is True:
print_success("{} {} is vulnerable".format(name, exploit))
self.vulnerabilities.append(exploit)
elif response is False:
print_error("{} {} is not vulnerable".format(name, exploit))
else:
......
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