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

@ -725,8 +725,8 @@ def paramToDict(place, parameters=None):
if value and not value.isdigit(): if value and not value.isdigit():
for encoding in ("hex", "base64"): for encoding in ("hex", "base64"):
try: try:
decoded = value.decode(encoding) decoded = codecs.decode(value, encoding)
if len(decoded) > MIN_ENCODED_LEN_CHECK and all(_ in string.printable for _ in decoded): if len(decoded) > MIN_ENCODED_LEN_CHECK and all(_ in getBytes(string.printable) for _ in decoded):
warnMsg = "provided parameter '%s' " % parameter warnMsg = "provided parameter '%s' " % parameter
warnMsg += "appears to be '%s' encoded" % encoding warnMsg += "appears to be '%s' encoded" % encoding
logger.warn(warnMsg) logger.warn(warnMsg)

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty import six from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.5.32" VERSION = "1.3.5.33"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} 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) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -7,6 +7,7 @@ See the file 'LICENSE' for copying permission
from __future__ import print_function from __future__ import print_function
import codecs
import os import os
import re import re
import socket import socket
@ -78,7 +79,7 @@ class DNSServer(object):
try: try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("", 53)) 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) response = s.recv(512)
except: except:
pass pass