From e257a62dc81de4da0ac4d158084f81ec65a7e1da Mon Sep 17 00:00:00 2001 From: acidvegas Date: Fri, 15 Dec 2023 23:15:44 -0500 Subject: [PATCH] Log DNS responses (if any) even if we get no title or body preview --- httpz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httpz.py b/httpz.py index 774fc7a..28b962e 100644 --- a/httpz.py +++ b/httpz.py @@ -185,12 +185,12 @@ async def process_file(): if domain: tasks.add(asyncio.create_task(check_url(session, domain))) - if len(tasks) >= args.concurrency: + if len(tasks) >= args.concurrency: # Should be a better way to do this done, tasks = await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED) for task in done: domain, protocol, title, body, dns_records, status_code = task.result() - if title or body: # log results for dns? + if title or body or dns_records: write_result_to_file(domain, protocol, title, body, dns_records, status_code) counter += 1