def output(self): """ Write output in the end of work :return: """ WSModule.output(self) self.logger.log("\nFound hosts (full):") for host in self.result: self.logger.log("\t{0} {1} (DNS: {2})".format( host['name'], host['ip'], host['dns'])) self.logger.log("\nFound hosts names:") for host in self.result: self.logger.log("\t{0}".format(host['name'])) self.logger.log("Found IPs:") uniq_hosts = [] for host in self.result: uniq_hosts.append(host['ip']) uniq_hosts = list(set(uniq_hosts)) for host in uniq_hosts: self.logger.log("\t" + host) self.logger.log("\nFound {0} hosts.".format(len(self.result)))
def output(self): """ Output in the end of work :return: """ WSModule.output(self) self.logger.log("\nFound {0} hosts:".format(len(self.result))) for host in self.result: self.logger.log("\t" + host)
def output(self): """ Output in the end of work :return: """ WSModule.output(self) self.logger.log("") for fuzz in self.result: self.logger.log("\t{0} (Word(s): {1}, Header: {2})".format( fuzz['url'], ", ".join(fuzz['words']), fuzz['header']))
def output(self): """ Output in the end of work :return: """ WSModule.output(self) self.logger.log("") self.logger.log("Passwords found:") for row in self.result: self.logger.log('\t' + row['word'])
def output(self): """ Output in the end of work :return: """ WSModule.output(self) self.logger.log("") self.logger.log("Params found:") for result_row in self.result: self.logger.log("\t" + result_row)
def do_work(self): """ Start working """ self.validate_main() dict_path = "/tmp/web-scout-content-discovery-%d.txt" % random.randint( 1000000, 9000000) self.build_attack_list(dict_path) dict_path_uniq = dict_path + "-uniq" subprocess.check_output("sort -u {0} > {1}".format( dict_path, dict_path_uniq), shell=True) tmp_files = Registry().get('tmp_files') tmp_files.append(dict_path) tmp_files.append(dict_path_uniq) Registry().set('tmp_files', tmp_files) self.options['dict'] = WSOption("dict", "Dictionary for work", "", True, ['--dict']) self.options['dict'].value = dict_path_uniq WSModule.do_work(self)
def run(self, action): """ Method of run the module """ WSModule.run(self, action) self.done = True
def __init__(self, kernel): WSModule.__init__(self, kernel) self.model = IpsModel()
def run(self, action): WSModule.run(self, action) self.done = True
def __init__(self, kernel): WSModule.__init__(self, kernel) self.model = HostsModel()
def test_init_log_path_check(self): with pytest.raises(WSException) as ex: WSModule(False) assert "must have log path" in str(ex)
def __init__(self, kernel): WSModule.__init__(self, kernel) self.model = ProjectsModel()
def output(self): WSModule.output(self) self.logger.log("\n") for result_row in self.result: self.logger.log("{0} {1}".format(result_row['code'], result_row['url']))