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

Skip to content

Commit 938716e

Browse files
committed
Proper fix for --start and --stop consistency amongst different techniques
1 parent e71f96a commit 938716e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/core/option.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,8 +1700,8 @@ def __basicOptionValidation():
17001700
raise sqlmapSyntaxException, errMsg
17011701

17021702
if conf.limitStart is not None and isinstance(conf.limitStart, int) and conf.limitStart > 0 and \
1703-
conf.limitStop is not None and isinstance(conf.limitStop, int) and conf.limitStop <= conf.limitStart:
1704-
errMsg = "value for --start (limitStart) option must be smaller than value for --stop (limitStop) option"
1703+
conf.limitStop is not None and isinstance(conf.limitStop, int) and conf.limitStop < conf.limitStart:
1704+
errMsg = "value for --start (limitStart) option must be smaller or equal than value for --stop (limitStop) option"
17051705
raise sqlmapSyntaxException, errMsg
17061706

17071707
if conf.firstChar is not None and isinstance(conf.firstChar, int) and conf.firstChar > 0 and \

lib/techniques/error/use.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
283283
stopLimit += startLimit
284284
elif dump:
285285
if conf.limitStart:
286-
startLimit = conf.limitStart
286+
startLimit = conf.limitStart - 1
287287
if conf.limitStop:
288288
stopLimit = conf.limitStop
289289

lib/techniques/union/use.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def unionUse(expression, unpack=True, dump=False):
221221
stopLimit += startLimit
222222
elif dump:
223223
if conf.limitStart:
224-
startLimit = conf.limitStart
224+
startLimit = conf.limitStart - 1
225225
if conf.limitStop:
226226
stopLimit = conf.limitStop
227227

0 commit comments

Comments
 (0)