File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1056,6 +1056,20 @@ def __mergeOptions(inputOptions):
10561056 if not conf .has_key (key ) or conf [key ] is None or value is not None :
10571057 conf [key ] = value
10581058
1059+ def __basicOptionValidation ():
1060+ if conf .limitStart is not None and not (isinstance (conf .limitStart , int ) and conf .limitStart > 0 ):
1061+ errMsg = "value for LIMITSTART provided with --start option must be an integer value greater than zero (>0)"
1062+ raise sqlmapSyntaxException , errMsg
1063+
1064+ if conf .limitStop is not None and not (isinstance (conf .limitStop , int ) and conf .limitStop > 0 ):
1065+ errMsg = "value for LIMITSTOP provided with --stop option must be an integer value greater than zero (>0)"
1066+ raise sqlmapSyntaxException , errMsg
1067+
1068+ if conf .limitStart is not None and isinstance (conf .limitStart , int ) and conf .limitStart > 0 and \
1069+ conf .limitStop is not None and isinstance (conf .limitStop , int ) and conf .limitStop > 0 and conf .limitStop <= conf .limitStart :
1070+ errMsg = "value for LIMITSTART provided with --start option must be smaller than value for LIMITSTOP provided with --stop option"
1071+ raise sqlmapSyntaxException , errMsg
1072+
10591073def init (inputOptions = advancedDict ()):
10601074 """
10611075 Set attributes into both configuration and knowledge base singletons
@@ -1068,6 +1082,7 @@ def init(inputOptions=advancedDict()):
10681082 __setConfAttributes ()
10691083 __setKnowledgeBaseAttributes ()
10701084 __cleanupOptions ()
1085+ __basicOptionValidation ()
10711086 __setRequestFromFile ()
10721087
10731088 parseTargetUrl ()
You can’t perform that action at this time.
0 commit comments