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

Skip to content

Commit 99a23e2

Browse files
committed
Extra check on --union-cols value
1 parent da7eb32 commit 99a23e2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/core/option.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,11 @@ def __setUnion():
522522
conf.uColsStart = int(conf.uColsStart)
523523
conf.uColsStop = int(conf.uColsStop)
524524

525+
if conf.uColsStart > conf.uColsStop:
526+
errMsg = "--union-cols range has to be from lower to "
527+
errMsg += "higher number of columns"
528+
raise sqlmapSyntaxException, errMsg
529+
525530
if isinstance(conf.uChar, basestring) and conf.uChar != "NULL":
526531
debugMsg = "setting the UNION query SQL injection character to '%s'" % conf.uChar
527532
logger.debug(debugMsg)

0 commit comments

Comments
 (0)