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

Skip to content

Commit a35d1e5

Browse files
committed
Minor patch related to the email from ML
1 parent f5cf22a commit a35d1e5

5 files changed

Lines changed: 14 additions & 8 deletions

File tree

lib/core/common.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,7 +2345,7 @@ def wasLastResponseDelayed():
23452345
deviation = stdev(kb.responseTimes.get(kb.responseTimeMode, []))
23462346
threadData = getCurrentThreadData()
23472347

2348-
if deviation and not conf.direct:
2348+
if deviation and not conf.direct and not conf.disableStats:
23492349
if len(kb.responseTimes[kb.responseTimeMode]) < MIN_TIME_RESPONSES:
23502350
warnMsg = "time-based standard deviation method used on a model "
23512351
warnMsg += "with less than %d response times" % MIN_TIME_RESPONSES
@@ -2365,7 +2365,10 @@ def wasLastResponseDelayed():
23652365

23662366
return retVal
23672367
else:
2368-
return (threadData.lastQueryDuration - conf.timeSec) >= 0
2368+
delta = threadData.lastQueryDuration - conf.timeSec
2369+
if Backend.getIdentifiedDbms() in (DBMS.MYSQL,): # MySQL's SLEEP(X) lasts 0.05 seconds shorter on average
2370+
delta += 0.05
2371+
return delta >= 0
23692372

23702373
def adjustTimeDelay(lastQueryDuration, lowerStdLimit):
23712374
"""

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.2.5"
22+
VERSION = "1.1.2.6"
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/parse/cmdline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,9 @@ def cmdLineParser(argv=None):
777777
parser.add_option("--disable-precon", dest="disablePrecon", action="store_true",
778778
help=SUPPRESS_HELP)
779779

780+
parser.add_option("--disable-stats", dest="disableStats", action="store_true",
781+
help=SUPPRESS_HELP)
782+
780783
parser.add_option("--profile", dest="profile", action="store_true",
781784
help=SUPPRESS_HELP)
782785

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ def _randomizeParameter(paramString, randomParameter):
10801080
elif kb.postUrlEncode:
10811081
post = urlencode(post, spaceplus=kb.postSpaceToPlus)
10821082

1083-
if timeBasedCompare:
1083+
if timeBasedCompare and not conf.disableStats:
10841084
if len(kb.responseTimes.get(kb.responseTimeMode, [])) < MIN_TIME_RESPONSES:
10851085
clearConsoleLine()
10861086

txt/checksum.md5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ b3eec7f44bcc5d784d171a187b7fe8cb lib/controller/handler.py
2626
310efc965c862cfbd7b0da5150a5ad36 lib/controller/__init__.py
2727
19905ecb4437b94512cf21d5f1720091 lib/core/agent.py
2828
6cc95a117fbd34ef31b9aa25520f0e31 lib/core/bigarray.py
29-
15c19630897cff73744fb2866719d1e9 lib/core/common.py
29+
a64af9f1242d0d3aa1b7d19293de2fd5 lib/core/common.py
3030
5065a4242a8cccf72f91e22e1007ae63 lib/core/convert.py
3131
a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py
3232
7936d78b1a7f1f008ff92bf2f88574ba lib/core/datatype.py
@@ -45,7 +45,7 @@ e544108e2238d756c94a240e8a1ce061 lib/core/optiondict.py
4545
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4646
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4747
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
48-
08cbff7b1cc2c2ed3eb38ba992510e9c lib/core/settings.py
48+
ab0f0f7f1e982544f72eca4424d93357 lib/core/settings.py
4949
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5050
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5151
afd0636d2e93c23f4f0a5c9b6023ea17 lib/core/target.py
@@ -56,7 +56,7 @@ ad74fc58fc7214802fd27067bce18dd2 lib/core/unescaper.py
5656
4d13ed693401a498b6d073a2a494bd83 lib/core/wordlist.py
5757
310efc965c862cfbd7b0da5150a5ad36 lib/__init__.py
5858
8c4b04062db2245d9e190b413985202a lib/parse/banner.py
59-
9b12924e9da625f97b7ec87773214000 lib/parse/cmdline.py
59+
0fdb733d3f116b01cd2709b3980aa892 lib/parse/cmdline.py
6060
3a31657bc38f277d0016ff6d50bde61f lib/parse/configfile.py
6161
14539f1be714d4f1ed042067d63bc50a lib/parse/handler.py
6262
64e5bb3ecbdd75144500588b437ba8da lib/parse/headers.py
@@ -67,7 +67,7 @@ a0444cc351cd6d29015ad16d9eb46ff4 lib/parse/sitemap.py
6767
403d873f1d2fd0c7f73d83f104e41850 lib/request/basicauthhandler.py
6868
6d04ee525e75bf0082e9f1f6d8506546 lib/request/basic.py
6969
ef48de622b0a6b4a71df64b0d2785ef8 lib/request/comparison.py
70-
49f8ee7010c2d22ed06631fa70a513f5 lib/request/connect.py
70+
d57655ea924108989a235a7fa02a45f0 lib/request/connect.py
7171
fb6b788d0016ab4ec5e5f661f0f702ad lib/request/direct.py
7272
cc1163d38e9b7ee5db2adac6784c02bb lib/request/dns.py
7373
5dcdb37823a0b5eff65cd1018bcf09e4 lib/request/httpshandler.py

0 commit comments

Comments
 (0)