Skip to content

Commit 9b0e262

Browse files
committed
Fix related to the #6149
1 parent d574154 commit 9b0e262

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎lib/controller/controller.py‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ def _autoWafBypass(place, parameter, value):
223223

224224
return retVal
225225

226+
def _targetInfo():
227+
return {"url": conf.url, "query": conf.parameters.get(PLACE.GET), "data": conf.parameters.get(PLACE.POST)}
228+
226229
def _showInjections():
227230
if conf.wizard and kb.wizardMode:
228231
kb.wizardMode = False
@@ -234,13 +237,12 @@ def _showInjections():
234237
header = "sqlmap resumed the following injection point(s) from stored session"
235238

236239
if conf.api:
237-
conf.dumper.string("", {"url": conf.url, "query": conf.parameters.get(PLACE.GET), "data": conf.parameters.get(PLACE.POST)}, content_type=CONTENT_TYPE.TARGET)
240+
conf.dumper.string("", _targetInfo(), content_type=CONTENT_TYPE.TARGET)
238241
conf.dumper.string("", kb.injections, content_type=CONTENT_TYPE.TECHNIQUES)
239242
else:
240-
# --report-json: capture the same TARGET/TECHNIQUES structures the API emits, without
241-
# printing them (the human-readable injection points are rendered just below)
243+
# --report-json: capture the same TECHNIQUES structure the API emits, without printing it (the
244+
# human-readable injection points are rendered just below); TARGET is reported per target in start()
242245
if conf.reportJson:
243-
conf.dumper._reportData({"url": conf.url, "query": conf.parameters.get(PLACE.GET), "data": conf.parameters.get(PLACE.POST)}, CONTENT_TYPE.TARGET)
244246
conf.dumper._reportData(kb.injections, CONTENT_TYPE.TECHNIQUES)
245247

246248
data = "".join(set(_formatInjection(_) for _ in kb.injections)).rstrip("\n")
@@ -522,6 +524,11 @@ def start():
522524

523525
setupTargetEnv()
524526

527+
# --report-json: every tested target gets its own group with its identity, also when nothing is found
528+
# (otherwise its errors, e.g. connection failures, would have no group to land in)
529+
if conf.reportJson:
530+
conf.dumper._reportData(_targetInfo(), CONTENT_TYPE.TARGET)
531+
525532
if not any((conf.graphql,)) and not checkConnection(suppressOutput=conf.forms):
526533
continue
527534

‎lib/core/settings.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

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

0 commit comments

Comments
 (0)