How do I use Python s subprocess to run multiple DNS queries in parallel

0 votes
I’m working on a Python script that needs to run DNS queries for multiple domains in parallel, and I want to use the subprocess module to execute dig commands. I’ve been able to run individual queries using subprocess.run(), but I’m not sure how to scale this by running several DNS queries at the same time without blocking the execution of the script.

What’s the best way to use subprocess to achieve parallel execution of DNS queries? Should I use threading or multiprocessing in combination with subprocess, or is there a simpler solution? Any examples on how to handle this efficiently would be helpful.
1 day ago in Cyber Security & Ethical Hacking by Anupam
• 1,290 points
12 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Cyber Security & Ethical Hacking

+1 vote
1 answer
0 votes
0 answers

I do not have a real result about encryption file use AES mode CFB in pycrptodome on python

I'm using Ubuntu win. on python I ...READ MORE

Aug 23, 2019 in Cyber Security & Ethical Hacking by Ahmed
• 310 points

closed Aug 23, 2019 by Ahmed 855 views
0 votes
1 answer

How do i check a ip address range whether it falls in Class A,Class B,Class C

class NetworkId{ static String findClass(String str){ int index = ...READ MORE

answered Feb 16, 2022 in Cyber Security & Ethical Hacking by Edureka
• 13,620 points
842 views
0 votes
1 answer

How do you decrypt a ROT13 encryption on the terminal itself?

Yes, it's possible to decrypt a ROT13 ...READ MORE

answered 23 hours ago in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 360 points
15 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP