def run(self): vulnerabilities = [] for exploit in utils.iter_modules(utils.EXPLOITS_DIR): exploit = exploit() exploit.target = self.target exploit.port = self.port response = exploit.check() if response is True: print_success("{} is vulnerable".format(exploit)) vulnerabilities.append(exploit) elif response is False: print_error("{} is not vulnerable".format(exploit)) else: print_status("{} could not be verified".format(exploit)) if vulnerabilities: print_info() print_success("Device is vulnerable!") for v in vulnerabilities: print_info(" - {}".format(v)) else: print_error("Device is not vulnerable to any exploits!\n")
def run(self): self.vulnerabilities = [] self.not_verified = [] target = utils.safe_json_loads(self.target) if target: self.target = target with threads.ThreadPoolExecutor(self.threads) as executor: for directory in self._exploits_directories: for exploit in utils.iter_modules(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:") for v in self.vulnerabilities: print_info(" - {}".format(v)) print_info() else: print_error("Could not confirm any vulnerablity\n")
def run(self): self.vulnerabilities = [] self.not_verified = [] with threads.ThreadPoolExecutor(self.threads) as executor: for directory in self._exploits_directories:call for exploit in utils.iter_modules(directory): executor.submit(self.target_function, exploit)
def load_tests(loader, tests, pattern): """ Map every module to a test case, and group them into a suite. """ suite = unittest.TestSuite() test_names = loader.getTestCaseNames(ModuleTest) for module in iter_modules(): suite.addTests([ModuleTest(name, module) for name in test_names]) return suite
def run(self): self.vulnerabilities = [] 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.vulnerabilities: 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")
def run(self): self.vulnerabilities = [] self.not_verified = [] with threads.ThreadPoolExecutor(self.threads) as executor: for directory in self._exploits_directories: for exploit in utils.iter_modules(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:") for v in self.vulnerabilities: print_info(" - {}".format(v)) print_info() else: print_error("Could not confirm any vulnerablity\n")