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

Skip to content

Commit 25541ef

Browse files
committed
Minor update
1 parent df8fa9c commit 25541ef

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

lib/controller/checks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from lib.core.common import hashDBRetrieve
3131
from lib.core.common import hashDBWrite
3232
from lib.core.common import intersect
33+
from lib.core.common import joinValue
3334
from lib.core.common import listToStrValue
3435
from lib.core.common import parseFilePaths
3536
from lib.core.common import popValue
@@ -153,7 +154,7 @@ def checkSqlInjection(place, parameter, value):
153154
# payload), ask the user to limit the tests to the fingerprinted
154155
# DBMS
155156
if kb.reduceTests is None and not conf.testFilter and (intersect(Backend.getErrorParsedDBMSes(), SUPPORTED_DBMS, True) or kb.heuristicDbms or injection.dbms):
156-
msg = "it looks like the back-end DBMS is '%s'. " % (Format.getErrorParsedDBMSes() or kb.heuristicDbms or injection.dbms)
157+
msg = "it looks like the back-end DBMS is '%s'. " % (Format.getErrorParsedDBMSes() or kb.heuristicDbms or joinValue(injection.dbms, '/'))
157158
msg += "Do you want to skip test payloads specific for other DBMSes? [Y/n]"
158159
kb.reduceTests = (Backend.getErrorParsedDBMSes() or [kb.heuristicDbms]) if readInput(msg, default='Y', boolean=True) else []
159160

@@ -163,7 +164,7 @@ def checkSqlInjection(place, parameter, value):
163164
# regardless of --level and --risk values provided
164165
if kb.extendTests is None and not conf.testFilter and (conf.level < 5 or conf.risk < 3) and (intersect(Backend.getErrorParsedDBMSes(), SUPPORTED_DBMS, True) or kb.heuristicDbms or injection.dbms):
165166
msg = "for the remaining tests, do you want to include all tests "
166-
msg += "for '%s' extending provided " % (Format.getErrorParsedDBMSes() or kb.heuristicDbms or injection.dbms)
167+
msg += "for '%s' extending provided " % (Format.getErrorParsedDBMSes() or kb.heuristicDbms or joinValue(injection.dbms, '/'))
167168
msg += "level (%d)" % conf.level if conf.level < 5 else ""
168169
msg += " and " if conf.level < 5 and conf.risk < 3 else ""
169170
msg += "risk (%d)" % conf.risk if conf.risk < 3 else ""

lib/core/common.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3484,6 +3484,23 @@ def flattenValue(value):
34843484
else:
34853485
yield i
34863486

3487+
def joinValue(value, delimiter=','):
3488+
"""
3489+
Returns a value consisting of joined parts of a given value
3490+
3491+
>>> joinValue(['1', '2'])
3492+
'1,2'
3493+
>>> joinValue('1')
3494+
'1'
3495+
"""
3496+
3497+
if isListLike(value):
3498+
retVal = delimiter.join(value)
3499+
else:
3500+
retVal = value
3501+
3502+
return retVal
3503+
34873504
def isListLike(value):
34883505
"""
34893506
Returns True if the given value is a list-like instance

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.35"
21+
VERSION = "1.3.11.36"
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)

0 commit comments

Comments
 (0)