This file contains hidden or 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
import os | |
import socket | |
import struct | |
import asyncio | |
import logging | |
DNS_SERVER = '8.8.8.8' | |
DNS_PORT = 53 | |
def encode_header(packet_id): |