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

Skip to content

Commit b327bbc

Browse files
committed
minor fix (it was quite ... to have this check at the later stage)
1 parent fdef672 commit b327bbc

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/core/option.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,10 @@ def __basicOptionValidation():
14961496
errMsg = "value for --time-sec option must be an integer greater than 0"
14971497
raise sqlmapSyntaxException, errMsg
14981498

1499+
if isinstance(conf.uCols, basestring) and ("-" not in conf.uCols or len(conf.uCols.split("-")) != 2):
1500+
errMsg = "--union-cols must be a range with hyphon (e.g. 1-10)"
1501+
raise sqlmapSyntaxException, errMsg
1502+
14991503
def init(inputOptions=advancedDict(), overrideOptions=False):
15001504
"""
15011505
Set attributes into both configuration and knowledge base singletons

lib/techniques/inband/union/use.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ def __configUnionChar(char):
8080
conf.uChar = "'%s'" % char
8181

8282
def __configUnionCols(columns):
83-
if "-" not in columns or len(columns.split("-")) != 2:
84-
raise sqlmapSyntaxException, "--union-cols must be a range with hyphon (e.g. 1-10)"
85-
8683
columns = columns.replace(" ", "")
8784
colsStart, colsStop = columns.split("-")
8885

0 commit comments

Comments
 (0)