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

Skip to content

Commit e8336ec

Browse files
committed
Fix of a pesky often 'statistical model' retrieval
1 parent 38ea068 commit e8336ec

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

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.2.6.40"
22+
VERSION = "1.2.6.41"
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)

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ def _randomizeParameter(paramString, randomParameter):
11621162
singleTimeWarnMessage(warnMsg)
11631163

11641164
warnMsg = "[%s] [WARNING] %stime-based comparison requires " % (time.strftime("%X"), "(case) " if kb.responseTimeMode else "")
1165-
warnMsg += "larger statistical model, please wait"
1165+
warnMsg += "%s statistical model, please wait" % ("larger" if len(kb.responseTimes) == 1 else "reset of")
11661166
dataToStdout(warnMsg)
11671167

11681168
while len(kb.responseTimes[kb.responseTimeMode]) < MIN_TIME_RESPONSES:

lib/request/inject.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ def getValue(expression, blind=True, union=True, error=True, time=True, fromUser
440440
found = (value is not None) or (value is None and expectingNone) or count >= MAX_TECHNIQUES_PER_VALUE
441441

442442
if time and (isTechniqueAvailable(PAYLOAD.TECHNIQUE.TIME) or isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED)) and not found:
443-
kb.responseTimeMode = re.sub(r"(?i)[^a-z]", "", re.sub(r"'[^']+'", "", re.sub(r"(?i)(\w+)\(.+\)", r"\g<1>", expression))) if re.search(r"(?i)SELECT.+FROM", expression) else None
443+
match = re.search(r"\bFROM\b ([^ ]+).+ORDER BY ([^ ]+)", expression)
444+
kb.responseTimeMode = "%s|%s" % (match.group(1), match.group(2)) if match else None
444445

445446
if isTechniqueAvailable(PAYLOAD.TECHNIQUE.TIME):
446447
kb.technique = PAYLOAD.TECHNIQUE.TIME

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4848
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4949
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5050
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
51-
da93a924f9a99c51cab7d8e7adb2448d lib/core/settings.py
51+
2aab203a038a8c4d06794a9fdb878229 lib/core/settings.py
5252
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5353
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5454
95f04c1c1d8c3998d86e1bdf0e12771c lib/core/target.py
@@ -70,12 +70,12 @@ f2af274126ce0a789027d35d367f2b9e lib/parse/payloads.py
7070
30eed3a92a04ed2c29770e1b10d39dc0 lib/request/basicauthhandler.py
7171
2b81435f5a7519298c15c724e3194a0d lib/request/basic.py
7272
c0cabedead14b8a23353b606672cff42 lib/request/comparison.py
73-
1b5491cc079384f08cbc6b397786e1af lib/request/connect.py
73+
039f0f7cf997856fa2f6e8d5d69f7ae9 lib/request/connect.py
7474
dd4598675027fae99f2e2475b05986da lib/request/direct.py
7575
2044fce3f4ffa268fcfaaf63241b1e64 lib/request/dns.py
7676
98535d0efca5551e712fcc4b34a3f772 lib/request/httpshandler.py
7777
1e5532ede194ac9c083891c2f02bca93 lib/request/__init__.py
78-
c2fb1abbb7127ec6419bbf852c0a458d lib/request/inject.py
78+
a5cbc19ee18bd4b848515eb3ea3291f0 lib/request/inject.py
7979
aaf956c1e9855836c3f372e29d481393 lib/request/methodrequest.py
8080
51eeaa8abf5ba62aaaade66d46ff8b00 lib/request/pkihandler.py
8181
2c3774b72586985719035b195f144d7b lib/request/rangehandler.py

0 commit comments

Comments
 (0)