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

Skip to content

Commit f3cc416

Browse files
committed
Added check on --first and --last values
1 parent 0ffffef commit f3cc416

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/core/option.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,10 +1185,15 @@ def __basicOptionValidation():
11851185
raise sqlmapSyntaxException, errMsg
11861186

11871187
if conf.limitStart is not None and isinstance(conf.limitStart, int) and conf.limitStart > 0 and \
1188-
conf.limitStop is not None and isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop <= conf.limitStart:
1188+
conf.limitStop is not None and isinstance(conf.limitStop, int) and conf.limitStop <= conf.limitStart:
11891189
errMsg = "value for --start (limitStart) option must be smaller than value for --stop (limitStop) option"
11901190
raise sqlmapSyntaxException, errMsg
11911191

1192+
if conf.firstChar is not None and isinstance(conf.firstChar, int) and conf.firstChar > 0 and \
1193+
conf.lastChar is not None and isinstance(conf.lastChar, int) and conf.lastChar < conf.firstChar:
1194+
errMsg = "value for --first (firstChar) option must be smaller than or equal to value for --last (lastChar) option"
1195+
raise sqlmapSyntaxException, errMsg
1196+
11921197
if conf.cpuThrottle is not None and isinstance(conf.cpuThrottle, int) and (conf.cpuThrottle > 100 or conf.cpuThrottle < 0):
11931198
errMsg = "value for --cpu-throttle (cpuThrottle) option must be in range [0,100]"
11941199
raise sqlmapSyntaxException, errMsg

0 commit comments

Comments
 (0)