def init(target_choice, port_choice, extend_choice, rmself): print(cool.green("[+] Init ...")) print(cool.white("[+] Threads: {0}".format(str(get_threads())))) check_cmd_status() init_target(target_choice) init_port(port_choice) auto_choose_start() init_extend(extend_choice, rmself=rmself) print(cool.orange("[+] Load: {0} targets".format(len(unique(targets_pool))))) if len(unique(targets_pool)) > 0: create_output_file() print(cool.green("[+] Init sucess\n"))
def start(parse=False): queue = Queue.Queue() worker_threads = build_worker_pool(queue, get_threads()) if not parse: for x in unique(targets_pool): queue.put(x) else: for x in unique(domains_pool): queue.put(x) for worker in worker_threads: queue.put('quit') for worker in worker_threads: worker.join()
def port_use_file(file_path): with open(file_path, 'r') as port_file: for port in unique(port_file.readlines()): port = port.strip() if port != '' and port[0] != "#": ports_pool.append((port.split("#")[0]).strip()) set_port_string(",".join(ports_pool))
def start(): queue = Queue.Queue() worker_threads = builder(queue, threads) for dom_name in unique(domains): queue.put(dom_name) for worker in worker_threads: queue.put('quit') for worker in worker_threads: worker.join()
def target_use_file(file_path): with open(file_path, 'r') as target_file: for t in unique(target_file.readlines()): try: if t.startswith('http'): t = ((t.strip()).split('/')[2]).split(":")[0] else: t = (t.strip()).split(":")[0] except: pass if len(t) > 0 and '#' not in t[0]: if ip_pattern.findall(t): set_count(set_original_ip_count=True) targets_pool.append(t) elif domain_pattern.findall(t): set_global_parse_flag(new_flag=True) domains_pool.append(t)