This Python script uses the scapy
library to sniff DNS queries and responses. The tool captures UDP datagrams on port 53, both from the source and destination, allowing for real-time DNS traffic monitoring.
- Sniffs DNS queries and responses on the network.
- Displays packet details such as source and destination IPs.
- Color-coded output for better readability using
colorama
. - User-friendly command-line interface with
argparse
for specifying the network interface.
- Kali LXDE Linux
Before running the script, you need to install the required dependencies. Specifically, make sure to install Scapy by following the installation guide at: Scapy Installation Guide
Additionally, install colorama
for colorized output:
pip install colorama
Ensure you run the script with super-user permissions since scapy
requires administrative access for network sniffing.
sudo ./dnsSniffer.py -i <network_interface>
Replace <network_interface>
with the actual interface name (e.g., eth0
, wlan0
).
sudo ./dnsSniffer.py -i eth0
- By am0nt031r0
- Halil İbrahim, denizhalil.com
This updated version includes a refactor with improved structure, better error handling, colorized output, and argparse integration for enhanced functionality.
-
Mastering Linux Networking and Security: Essential and Advanced Techniques: Support on BuyMeACoffee
-
Mastering Scapy: A Comprehensive Guide to Network Analysis: Support on BuyMeACoffee
-
Mastering Python for Ethical Hacking: A Comprehensive Guide to Building Hacking Tools Support on BuyMeACoffee
Feel free to join our Production Brain Discord server to discuss cybersecurity, Python projects, and more:
Join Production Brain Discord
This project continues to grow with community feedback and contributions!