Skip to content

Commit e862da6

Browse files
committed
Update for an Issue sqlmapproject#2653
1 parent 1ac0704 commit e862da6

4 files changed

Lines changed: 19 additions & 10 deletions

File tree

lib/core/common.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,16 +1515,25 @@ def getLimitRange(count, plusOne=False):
15151515
retVal = None
15161516
count = int(count)
15171517
limitStart, limitStop = 1, count
1518+
reverse = False
15181519

15191520
if kb.dumpTable:
1520-
if isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop < limitStop:
1521-
limitStop = conf.limitStop
1521+
if conf.limitStart and conf.limitStop and conf.limitStart > conf.limitStop:
1522+
limitStop = conf.limitStart
1523+
limitStart = conf.limitStop
1524+
reverse = True
1525+
else:
1526+
if isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop < limitStop:
1527+
limitStop = conf.limitStop
15221528

1523-
if isinstance(conf.limitStart, int) and conf.limitStart > 0 and conf.limitStart <= limitStop:
1524-
limitStart = conf.limitStart
1529+
if isinstance(conf.limitStart, int) and conf.limitStart > 0 and conf.limitStart <= limitStop:
1530+
limitStart = conf.limitStart
15251531

15261532
retVal = xrange(limitStart, limitStop + 1) if plusOne else xrange(limitStart - 1, limitStop)
15271533

1534+
if reverse:
1535+
retVal = xrange(retVal[-1], retVal[0] - 1, -1)
1536+
15281537
return retVal
15291538

15301539
def parseUnionPage(page):

lib/core/option.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2370,8 +2370,8 @@ def _basicOptionValidation():
23702370

23712371
if isinstance(conf.limitStart, int) and conf.limitStart > 0 and \
23722372
isinstance(conf.limitStop, int) and conf.limitStop < conf.limitStart:
2373-
errMsg = "value for option '--start' (limitStart) must be smaller or equal than value for --stop (limitStop) option"
2374-
raise SqlmapSyntaxException(errMsg)
2373+
warnMsg = "usage of option '--start' (limitStart) which is bigger than value for --stop (limitStop) option is considered unstable"
2374+
logger.warn(warnMsg)
23752375

23762376
if isinstance(conf.firstChar, int) and conf.firstChar > 0 and \
23772377
isinstance(conf.lastChar, int) and conf.lastChar < conf.firstChar:

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.8.3"
22+
VERSION = "1.1.8.4"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ a66093c734c7f94ecdf94d882c2d8b89 lib/controller/controller.py
2727
310efc965c862cfbd7b0da5150a5ad36 lib/controller/__init__.py
2828
ca0a4eba91d73c9d7adedabf528ca4f1 lib/core/agent.py
2929
6cc95a117fbd34ef31b9aa25520f0e31 lib/core/bigarray.py
30-
1f88ce54a27cb98c301ea0c3fb83bce0 lib/core/common.py
30+
60dbe2a3c2914a9444a69f39250a81e4 lib/core/common.py
3131
5065a4242a8cccf72f91e22e1007ae63 lib/core/convert.py
3232
a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py
3333
7936d78b1a7f1f008ff92bf2f88574ba lib/core/datatype.py
@@ -40,13 +40,13 @@ a44d7a4cc6c9a67a72d6af2f25f4ddac lib/core/exception.py
4040
310efc965c862cfbd7b0da5150a5ad36 lib/core/__init__.py
4141
9ba39bf66e9ecd469446bdbbeda906c3 lib/core/log.py
4242
5a34a1be62eab520cacc197b5eacda39 lib/core/optiondict.py
43-
fbf750dc617c3549ee423d6c2334ba4d lib/core/option.py
43+
467a77eb68d193467a3a91d7b378501d lib/core/option.py
4444
5f2f56e6c5f274408df61943f1e080c0 lib/core/profiling.py
4545
40be71cd774662a7b420caeb7051e7d5 lib/core/readlineng.py
4646
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4747
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4848
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
49-
9d0fd30ccb8b33668cf0ef06f3ed742e lib/core/settings.py
49+
38f2c524858af0751fd13ba74427792f lib/core/settings.py
5050
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5151
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5252
4a6ecdd8a6e44bb4737bd9bc7f9b5743 lib/core/target.py

0 commit comments

Comments
 (0)