From 6062eb22dcc904a7071071cce81a10b098d53fa6 Mon Sep 17 00:00:00 2001 From: Jing Ling Date: Wed, 26 Aug 2020 23:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=BA=BF=E7=A8=8B=E4=B8=BA?= =?UTF-8?q?=E5=AE=88=E6=8A=A4=E7=BA=BF=E7=A8=8B=20=E9=9A=8F=E4=B8=BB?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B=E7=BB=93=E6=9D=9F=E8=80=8C=E7=BB=93=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/request.py | 5 +++-- modules/collect.py | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/request.py b/common/request.py index 704fde5..9ef347d 100644 --- a/common/request.py +++ b/common/request.py @@ -167,12 +167,13 @@ def bulk_request(urls): thread_count = req_thread_count() progress_thread = Thread(target=progress, name='ProgressThread', - args=(urls, resp_queue)) + args=(urls, resp_queue), daemon=True) progress_thread.start() for i in range(thread_count): request_thread = Thread(target=request, name=f'RequestThread-{i}', - args=(urls_queue, resp_queue, session)) + args=(urls_queue, resp_queue, session), + daemon=True) request_thread.start() urls_queue.join() diff --git a/modules/collect.py b/modules/collect.py index ab02a1e..b6cc110 100644 --- a/modules/collect.py +++ b/modules/collect.py @@ -49,9 +49,8 @@ class Collect(object): # Create subdomain collection threads for collect_func in self.collect_funcs: func_obj, func_name = collect_func - thread = threading.Thread(target=func_obj, - name=func_name, - args=(self.domain,)) + thread = threading.Thread(target=func_obj, name=func_name, + args=(self.domain,), daemon=True) threads.append(thread) # Start all threads for thread in threads: