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

Skip to content

Commit 6f52954

Browse files
committed
Making those --string tips (containing escaped characters) decodable by sqlmap
1 parent 142fc88 commit 6f52954

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

lib/controller/checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def genCmpPayload():
365365
candidates = filter(None, (_.strip() if _.strip() in (kb.pageTemplate or "") and _.strip() not in falsePage else None for _ in (trueSet - falseSet)))
366366
if candidates:
367367
conf.string = random.sample(candidates, 1)[0]
368-
infoMsg = "%s parameter '%s' seems to be '%s' injectable (with --string=%s)" % (place, parameter, title, repr(conf.string).lstrip('u'))
368+
infoMsg = "%s parameter '%s' seems to be '%s' injectable (with --string=\"%s\")" % (place, parameter, title, repr(conf.string).lstrip('u').strip("'"))
369369
logger.info(infoMsg)
370370

371371
injectable = True

lib/core/option.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,9 @@ class _(unicode): pass
13751375
if conf.oDir:
13761376
paths.SQLMAP_OUTPUT_PATH = conf.oDir
13771377

1378+
if conf.string:
1379+
conf.string = conf.string.decode("unicode_escape")
1380+
13781381
threadData = getCurrentThreadData()
13791382
threadData.reset()
13801383

0 commit comments

Comments
 (0)