Can you show me an example of using DNS dig commands in a Python script

0 votes
I'm trying to incorporate DNS queries into a Python script for a project involving network security analysis. I’ve been using the dig command from the terminal to retrieve DNS records, but I’d like to automate this process through Python.

How can I use the subprocess module to run dig commands within my Python script and then parse the output for further analysis? If there’s a more Pythonic way to perform DNS queries (without shelling out to dig), I’d love to see an example of that as well!
1 day ago in Cyber Security & Ethical Hacking by Anupam
• 1,290 points
10 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
0 answers

How can I encryption/decryption in Rijndael using python

I found this https://github.com/moeenz/rijndael ,but does not ...READ MORE

Sep 28, 2019 in Cyber Security & Ethical Hacking by Ahmed
• 310 points
4,801 views
0 votes
0 answers

What is the role of WHOIS data in DNS footprinting and how can I automate retrieval?

I’ve been learning about DNS footprinting as ...READ MORE

1 day ago in Cyber Security & Ethical Hacking by Anupam
• 1,290 points
13 views
0 votes
0 answers

How can I write a Ruby script to automate the process of brute-forcing a login form?

I’m learning about ethical hacking techniques, and ...READ MORE

1 day ago in Cyber Security & Ethical Hacking by Anupam
• 1,290 points
19 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