Created
July 18, 2022 23:25
-
-
Save jmtaylor90/9b4d4449a0ad12b7424b400a65935df9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
from scapy.all import DNS, DNSQR, IP, sr1, UDP | |
dns_req = IP(dst='8.8.8.8')/TCP(dport=53)/DNS(opcode=8,rd=1, qd=DNSQR(qname='www.google.com')) | |
answer = sr1(dns_req, verbose=0) | |
print(answer[DNS].summary()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment