From d815e6c278288db3fe5cb71bf519e14cabcf4135 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 16 May 2019 12:46:10 +0200 Subject: [PATCH] Bug fix for Python 3.3 (drei) --- lib/core/settings.py | 2 +- lib/request/dns.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 296184b97..8e6c5cbfd 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.5.99" +VERSION = "1.3.5.100" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/request/dns.py b/lib/request/dns.py index b6d8fb257..5c3e2f35e 100644 --- a/lib/request/dns.py +++ b/lib/request/dns.py @@ -7,6 +7,7 @@ See the file 'LICENSE' for copying permission from __future__ import print_function +import binascii import codecs import os import re @@ -79,7 +80,7 @@ class DNSServer(object): try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("", 53)) - s.send(codecs.decode("6509012000010000000000010377777706676f6f676c6503636f6d00000100010000291000000000000000", "hex")) # A www.google.com + s.send(binascii.unhexlify("6509012000010000000000010377777706676f6f676c6503636f6d00000100010000291000000000000000")) # A www.google.com response = s.recv(512) except: pass