Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f69741

Browse files
committed
Update regarding #545
1 parent bc5b643 commit 0f69741

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

lib/core/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,11 +2431,11 @@ def getUnicode(value, encoding=None, noneToNull=False):
24312431
except UnicodeDecodeError:
24322432
return six.text_type(str(value), errors="ignore") # encoding ignored for non-basestring instances
24332433

2434-
def getASCII(value):
2434+
def getBytes(value):
24352435
"""
2436-
Returns ASCII representation of provided Unicode value
2436+
Returns byte representation of provided Unicode value
24372437
2438-
>>> getASCII(getUnicode("foo\x01\x83\xffbar")) == "foo\x01\x83\xffbar"
2438+
>>> getBytes(getUnicode("foo\x01\x83\xffbar")) == "foo\x01\x83\xffbar"
24392439
True
24402440
"""
24412441

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from lib.core.enums import OS
1818

1919
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
20-
VERSION = "1.3.4.23"
20+
VERSION = "1.3.4.24"
2121
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2222
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2323
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/request/connect.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class WebSocketException(Exception):
3434
from lib.core.common import extractRegexResult
3535
from lib.core.common import filterNone
3636
from lib.core.common import findMultipartPostBoundary
37+
from lib.core.common import getBytes
3738
from lib.core.common import getCurrentThreadData
3839
from lib.core.common import getHeader
3940
from lib.core.common import getHostHeader
@@ -420,8 +421,8 @@ def getPage(**kwargs):
420421
value = re.sub(r"(%s)([^ \t])" % char, r"\g<1>\t\g<2>", value)
421422
headers[unicodeencode(key, kb.pageEncoding)] = value.strip("\r\n")
422423

423-
url = unicodeencode(url)
424-
post = unicodeencode(post)
424+
url = getBytes(url)
425+
post = getBytes(post)
425426

426427
if websocket_:
427428
ws = websocket.WebSocket()
@@ -452,7 +453,7 @@ class _(dict):
452453
logger.log(CUSTOM_LOGGING.TRAFFIC_OUT, requestMsg)
453454
else:
454455
if method and method not in (HTTPMETHOD.GET, HTTPMETHOD.POST):
455-
method = unicodeencode(method)
456+
method = getBytes(method)
456457
req = MethodRequest(url, post, headers)
457458
req.set_method(method)
458459
elif url is not None:

0 commit comments

Comments
 (0)