mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-24 10:33:47 +03:00
Update regarding #545
This commit is contained in:
parent
bc5b643700
commit
0f697418d9
|
@ -2431,11 +2431,11 @@ def getUnicode(value, encoding=None, noneToNull=False):
|
|||
except UnicodeDecodeError:
|
||||
return six.text_type(str(value), errors="ignore") # encoding ignored for non-basestring instances
|
||||
|
||||
def getASCII(value):
|
||||
def getBytes(value):
|
||||
"""
|
||||
Returns ASCII representation of provided Unicode value
|
||||
Returns byte representation of provided Unicode value
|
||||
|
||||
>>> getASCII(getUnicode("foo\x01\x83\xffbar")) == "foo\x01\x83\xffbar"
|
||||
>>> getBytes(getUnicode("foo\x01\x83\xffbar")) == "foo\x01\x83\xffbar"
|
||||
True
|
||||
"""
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
|||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.4.23"
|
||||
VERSION = "1.3.4.24"
|
||||
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)
|
||||
|
|
|
@ -34,6 +34,7 @@ from lib.core.common import evaluateCode
|
|||
from lib.core.common import extractRegexResult
|
||||
from lib.core.common import filterNone
|
||||
from lib.core.common import findMultipartPostBoundary
|
||||
from lib.core.common import getBytes
|
||||
from lib.core.common import getCurrentThreadData
|
||||
from lib.core.common import getHeader
|
||||
from lib.core.common import getHostHeader
|
||||
|
@ -420,8 +421,8 @@ class Connect(object):
|
|||
value = re.sub(r"(%s)([^ \t])" % char, r"\g<1>\t\g<2>", value)
|
||||
headers[unicodeencode(key, kb.pageEncoding)] = value.strip("\r\n")
|
||||
|
||||
url = unicodeencode(url)
|
||||
post = unicodeencode(post)
|
||||
url = getBytes(url)
|
||||
post = getBytes(post)
|
||||
|
||||
if websocket_:
|
||||
ws = websocket.WebSocket()
|
||||
|
@ -452,7 +453,7 @@ class Connect(object):
|
|||
logger.log(CUSTOM_LOGGING.TRAFFIC_OUT, requestMsg)
|
||||
else:
|
||||
if method and method not in (HTTPMETHOD.GET, HTTPMETHOD.POST):
|
||||
method = unicodeencode(method)
|
||||
method = getBytes(method)
|
||||
req = MethodRequest(url, post, headers)
|
||||
req.set_method(method)
|
||||
elif url is not None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user