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

Skip to content

Commit 0961f6a

Browse files
committed
Fixes #2592
1 parent 5ec44b8 commit 0961f6a

4 files changed

Lines changed: 16 additions & 13 deletions

File tree

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4393,4 +4393,4 @@ def getSafeExString(ex, encoding=None):
43934393
elif getattr(ex, "msg", None):
43944394
retVal = ex.msg
43954395

4396-
return getUnicode(retVal, encoding=encoding)
4396+
return getUnicode(retVal or "", encoding=encoding).strip()

lib/core/settings.py

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

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.6.14"
22+
VERSION = "1.1.6.15"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
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: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,16 +1038,19 @@ def _randomizeParameter(paramString, randomParameter):
10381038
try:
10391039
compiler.parse(unicodeencode(conf.evalCode.replace(';', '\n')))
10401040
except SyntaxError, ex:
1041-
original = replacement = ex.text.strip()
1042-
for _ in re.findall(r"[A-Za-z_]+", original)[::-1]:
1043-
if _ in keywords:
1044-
replacement = replacement.replace(_, "%s%s" % (_, EVALCODE_KEYWORD_SUFFIX))
1041+
if ex.text:
1042+
original = replacement = ex.text.strip()
1043+
for _ in re.findall(r"[A-Za-z_]+", original)[::-1]:
1044+
if _ in keywords:
1045+
replacement = replacement.replace(_, "%s%s" % (_, EVALCODE_KEYWORD_SUFFIX))
1046+
break
1047+
if original == replacement:
1048+
conf.evalCode = conf.evalCode.replace(EVALCODE_KEYWORD_SUFFIX, "")
10451049
break
1046-
if original == replacement:
1047-
conf.evalCode = conf.evalCode.replace(EVALCODE_KEYWORD_SUFFIX, "")
1048-
break
1050+
else:
1051+
conf.evalCode = conf.evalCode.replace(getUnicode(ex.text.strip(), UNICODE_ENCODING), replacement)
10491052
else:
1050-
conf.evalCode = conf.evalCode.replace(getUnicode(ex.text.strip(), UNICODE_ENCODING), replacement)
1053+
break
10511054
else:
10521055
break
10531056

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ a97df93b552ee4e4ba3692eae870de7c lib/controller/handler.py
2727
310efc965c862cfbd7b0da5150a5ad36 lib/controller/__init__.py
2828
d58e85ffeac2471ef3af729076b3b5f7 lib/core/agent.py
2929
6cc95a117fbd34ef31b9aa25520f0e31 lib/core/bigarray.py
30-
20f5c7cb2e810a36e931addf8a289797 lib/core/common.py
30+
707bac1a4a6dee2cc608d6c75a93e254 lib/core/common.py
3131
5065a4242a8cccf72f91e22e1007ae63 lib/core/convert.py
3232
a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py
3333
7936d78b1a7f1f008ff92bf2f88574ba lib/core/datatype.py
@@ -46,7 +46,7 @@ f1531be15ed98555a9010e2db3c9da75 lib/core/optiondict.py
4646
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4747
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4848
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
49-
862f6871868a96595f78af4bcc3ad121 lib/core/settings.py
49+
c0cadf876c6fc183dfd4d51a1b795487 lib/core/settings.py
5050
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5151
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5252
04cca8a05faef752c98d1a775d98a0e6 lib/core/target.py
@@ -68,7 +68,7 @@ ad74fc58fc7214802fd27067bce18dd2 lib/core/unescaper.py
6868
403d873f1d2fd0c7f73d83f104e41850 lib/request/basicauthhandler.py
6969
7e77acc0e13a222a086dd052c52b1964 lib/request/basic.py
7070
ef48de622b0a6b4a71df64b0d2785ef8 lib/request/comparison.py
71-
736fabccf08c7493132ae66be60d0f58 lib/request/connect.py
71+
4b056460279e65eef5f4f4fe293e657b lib/request/connect.py
7272
fb6b788d0016ab4ec5e5f661f0f702ad lib/request/direct.py
7373
cc1163d38e9b7ee5db2adac6784c02bb lib/request/dns.py
7474
5dcdb37823a0b5eff65cd1018bcf09e4 lib/request/httpshandler.py

0 commit comments

Comments
 (0)