minor fix (it was quite ... to have this check at the later stage)

This commit is contained in:
Miroslav Stampar 2011-04-06 08:39:24 +00:00
parent fdef6726cf
commit b327bbcd9b
2 changed files with 4 additions and 3 deletions

View File

@ -1496,6 +1496,10 @@ def __basicOptionValidation():
errMsg = "value for --time-sec option must be an integer greater than 0"
raise sqlmapSyntaxException, errMsg
if isinstance(conf.uCols, basestring) and ("-" not in conf.uCols or len(conf.uCols.split("-")) != 2):
errMsg = "--union-cols must be a range with hyphon (e.g. 1-10)"
raise sqlmapSyntaxException, errMsg
def init(inputOptions=advancedDict(), overrideOptions=False):
"""
Set attributes into both configuration and knowledge base singletons

View File

@ -80,9 +80,6 @@ def configUnion(char=None, columns=None):
conf.uChar = "'%s'" % char
def __configUnionCols(columns):
if "-" not in columns or len(columns.split("-")) != 2:
raise sqlmapSyntaxException, "--union-cols must be a range with hyphon (e.g. 1-10)"
columns = columns.replace(" ", "")
colsStart, colsStop = columns.split("-")