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

Skip to content

Commit 6d07d52

Browse files
committed
Minor patch
1 parent ac9c2f1 commit 6d07d52

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

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

lib/request/direct.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8+
import re
89
import time
910

1011
from lib.core.agent import agent
@@ -43,8 +44,14 @@ def direct(query, content=True):
4344
select = False
4445
break
4546

46-
if select and not query.upper().startswith("SELECT "):
47-
query = "SELECT %s" % query
47+
if select:
48+
if not query.upper().startswith("SELECT "):
49+
query = "SELECT %s" % query
50+
if conf.binaryFields:
51+
for field in conf.binaryFields.split(','):
52+
field = field.strip()
53+
if re.search(r"\b%s\b" % re.escape(field), query):
54+
query = re.sub(r"\b%s\b" % re.escape(field), agent.hexConvertField(field), query)
4855

4956
logger.log(CUSTOM_LOGGING.PAYLOAD, query)
5057

0 commit comments

Comments
 (0)