From b327bbcd9ba6c00f558798425b89454347be2978 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 6 Apr 2011 08:39:24 +0000 Subject: [PATCH] minor fix (it was quite ... to have this check at the later stage) --- lib/core/option.py | 4 ++++ lib/techniques/inband/union/use.py | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 9d0fc3b71..a00eea6e2 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -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 diff --git a/lib/techniques/inband/union/use.py b/lib/techniques/inband/union/use.py index beb06468e..72dd9d919 100644 --- a/lib/techniques/inband/union/use.py +++ b/lib/techniques/inband/union/use.py @@ -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("-")