Skip to content

Instantly share code, notes, and snippets.

View oscarvalenzuelab's full-sized avatar
💭
I may be slow to respond.

Oscar V oscarvalenzuelab

💭
I may be slow to respond.
View GitHub Profile
import socket
from dnslib import RR, QTYPE, DNSRecord, DNSHeader, TXT
from time import time
DOMAIN = "REPLACE_WITH_YOUR_SUBDOMAIN"
def parse_response(data):
temp = DNSRecord.parse(data)
req = str(temp.q.qname)
subdomain = req.replace(DOMAIN, "")