Minor DREI patches

This commit is contained in:
Miroslav Stampar
2019-05-07 11:00:50 +02:00
parent 85365d73ff
commit 86ce1c5a5a
3 changed files with 5 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ See the file 'LICENSE' for copying permission
from __future__ import print_function
import codecs
import os
import re
import socket
@@ -78,7 +79,7 @@ class DNSServer(object):
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("", 53))
s.send("6509012000010000000000010377777706676f6f676c6503636f6d00000100010000291000000000000000".decode("hex")) # A www.google.com
s.send(codecs.decode("6509012000010000000000010377777706676f6f676c6503636f6d00000100010000291000000000000000", "hex")) # A www.google.com
response = s.recv(512)
except:
pass