(data,host,port)
return response
Helper function to send/receive DNS UDP request
Helper function to send/receive DNS UDP request
Helper function to send / receive DNS UDP request
def send_udp(data,host,port):
    """
        Helper function to send/receive DNS UDP request
    """
    sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
    sock.sendto(data,(host,port))
    response,server = sock.recvfrom(8192)
    sock.close()
    return response
def send_udp ( data , host , port ) : sock = socket . socket ( socket . AF_INET , socket . SOCK_DGRAM ) sock . sendto ( data , ( host , port ) ) response , server = sock . recvfrom ( 8192 ) sock . close ( ) return response