From d2b16c5c91e4e7c032be85ed9cac7c4629b6cb74 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 1 Mar 2017 11:09:55 +0100 Subject: [PATCH] Fixes #2422 --- lib/core/common.py | 11 ++++++----- lib/core/settings.py | 2 +- lib/parse/cmdline.py | 4 ++-- sqlmap.conf | 6 +++--- txt/checksum.md5 | 6 +++--- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 249c1d44d..32e4b1591 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -465,7 +465,7 @@ class Backend: if not kb: pass - elif not kb.testMode and conf.dbmsHandler and getattr(conf.dbmsHandler, "_dbms", None): + elif not kb.get("testMode") and conf.get("dbmsHandler") and getattr(conf.dbmsHandler, "_dbms", None): dbms = conf.dbmsHandler._dbms elif Backend.getForcedDbms() is not None: dbms = Backend.getForcedDbms() @@ -1497,11 +1497,12 @@ def getLimitRange(count, plusOne=False): count = int(count) limitStart, limitStop = 1, count - if isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop < limitStop: - limitStop = conf.limitStop + if kb.dumpTable: + if isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop < limitStop: + limitStop = conf.limitStop - if isinstance(conf.limitStart, int) and conf.limitStart > 0 and conf.limitStart <= limitStop: - limitStart = conf.limitStart + if isinstance(conf.limitStart, int) and conf.limitStart > 0 and conf.limitStart <= limitStop: + limitStart = conf.limitStart retVal = xrange(limitStart, limitStop + 1) if plusOne else xrange(limitStart - 1, limitStop) diff --git a/lib/core/settings.py b/lib/core/settings.py index f4f4c7bf8..a577596a6 100755 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.1.3.1" +VERSION = "1.1.3.2" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 9fefa7a6c..d46374eac 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -482,10 +482,10 @@ def cmdLineParser(argv=None): help="Use WHERE condition while table dumping") enumeration.add_option("--start", dest="limitStart", type="int", - help="First query output entry to retrieve") + help="First dump table entry to retrieve") enumeration.add_option("--stop", dest="limitStop", type="int", - help="Last query output entry to retrieve") + help="Last dump table entry to retrieve") enumeration.add_option("--first", dest="firstChar", type="int", help="First query output word character to retrieve") diff --git a/sqlmap.conf b/sqlmap.conf index a620f854a..07a611468 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -512,13 +512,13 @@ excludeSysDbs = False # First query output entry to retrieve # Valid: integer -# Default: 0 (sqlmap will start to retrieve the query output entries from -# the first) +# Default: 0 (sqlmap will start to retrieve the table dump entries from +# first one) limitStart = 0 # Last query output entry to retrieve # Valid: integer -# Default: 0 (sqlmap will detect the number of query output entries and +# Default: 0 (sqlmap will detect the number of table dump entries and # retrieve them until the last) limitStop = 0 diff --git a/txt/checksum.md5 b/txt/checksum.md5 index 9728b2794..164ac2680 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -26,7 +26,7 @@ dc386321e8813788f155dc557a78be8d lib/controller/controller.py 310efc965c862cfbd7b0da5150a5ad36 lib/controller/__init__.py 19905ecb4437b94512cf21d5f1720091 lib/core/agent.py 6cc95a117fbd34ef31b9aa25520f0e31 lib/core/bigarray.py -bddba28eea6caf94db25b913e29c4d17 lib/core/common.py +7d9c202d105cc08d2c3785d0f2f45a20 lib/core/common.py 5065a4242a8cccf72f91e22e1007ae63 lib/core/convert.py a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py 7936d78b1a7f1f008ff92bf2f88574ba lib/core/datatype.py @@ -45,7 +45,7 @@ a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py d8e9250f3775119df07e9070eddccd16 lib/core/replication.py 785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py 40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py -6d28b22630c9386097a754dc548462dd lib/core/settings.py +b06afbda30432e1193289822da317b58 lib/core/settings.py d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py 2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py afd0636d2e93c23f4f0a5c9b6023ea17 lib/core/target.py @@ -56,7 +56,7 @@ ad74fc58fc7214802fd27067bce18dd2 lib/core/unescaper.py 4d13ed693401a498b6d073a2a494bd83 lib/core/wordlist.py 310efc965c862cfbd7b0da5150a5ad36 lib/__init__.py 8c4b04062db2245d9e190b413985202a lib/parse/banner.py -942e1d7cb6f777ff198358d43246c40c lib/parse/cmdline.py +54f06c50771ce894a3c6a418d545f4bf lib/parse/cmdline.py 3a31657bc38f277d0016ff6d50bde61f lib/parse/configfile.py 14539f1be714d4f1ed042067d63bc50a lib/parse/handler.py 64e5bb3ecbdd75144500588b437ba8da lib/parse/headers.py