def risk_cruising(self): """运行PoC任务""" poc_config = self.options.get("poc_config", []) plugins = [] for info in poc_config: if not info.get("enable"): continue plugins.append(info["plugin_name"]) result = run_risk_cruising(plugins=plugins, targets=self.site_list) for item in result: item["task_id"] = self.task_id item["save_date"] = utils.curr_date() utils.conn_db('vuln').insert_one(item)
def brute_config(self): plugins = [] brute_config = self.options.get("brute_config") for x in brute_config: if not x.get("enable"): continue plugins.append(x["plugin_name"]) if not plugins: return targets = self.site_list.copy() targets += list(self.npoc_service_target_set) result = run_risk_cruising(targets=targets, plugins=plugins) for item in result: item["task_id"] = self.task_id item["save_date"] = utils.curr_date() utils.conn_db('vuln').insert_one(item)