Log DNS responses (if any) even if we get no title or body preview

This commit is contained in:
Dionysus 2023-12-15 23:15:44 -05:00
parent 3b96fa7bfd
commit e257a62dc8
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -185,12 +185,12 @@ async def process_file():
if domain: if domain:
tasks.add(asyncio.create_task(check_url(session, 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) done, tasks = await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED)
for task in done: for task in done:
domain, protocol, title, body, dns_records, status_code = task.result() 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) write_result_to_file(domain, protocol, title, body, dns_records, status_code)
counter += 1 counter += 1