mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
added "lagging" critical message
This commit is contained in:
parent
959204cff9
commit
7a06af9a92
|
@ -66,6 +66,9 @@ CONCAT_VALUE_DELIMITER = '|'
|
||||||
# coefficient used for a time-based query delay checking (must be >= 7)
|
# coefficient used for a time-based query delay checking (must be >= 7)
|
||||||
TIME_STDEV_COEFF = 10
|
TIME_STDEV_COEFF = 10
|
||||||
|
|
||||||
|
# standard deviation after which a warning message should be displayed about connection lags
|
||||||
|
WARN_TIME_STDEV = 0.5
|
||||||
|
|
||||||
# minimum length of usable union injected response (quick defense against substr fields)
|
# minimum length of usable union injected response (quick defense against substr fields)
|
||||||
UNION_MIN_RESPONSE_CHARS = 10
|
UNION_MIN_RESPONSE_CHARS = 10
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ from lib.core.exception import sqlmapSyntaxException
|
||||||
from lib.core.settings import HTTP_SILENT_TIMEOUT
|
from lib.core.settings import HTTP_SILENT_TIMEOUT
|
||||||
from lib.core.settings import META_REFRESH_REGEX
|
from lib.core.settings import META_REFRESH_REGEX
|
||||||
from lib.core.settings import MIN_TIME_RESPONSES
|
from lib.core.settings import MIN_TIME_RESPONSES
|
||||||
|
from lib.core.settings import WARN_TIME_STDEV
|
||||||
from lib.core.settings import URI_HTTP_HEADER
|
from lib.core.settings import URI_HTTP_HEADER
|
||||||
from lib.core.threads import getCurrentThreadData
|
from lib.core.threads import getCurrentThreadData
|
||||||
from lib.request.basic import decodePage
|
from lib.request.basic import decodePage
|
||||||
|
@ -501,6 +502,12 @@ class Connect:
|
||||||
while len(kb.responseTimes) < MIN_TIME_RESPONSES:
|
while len(kb.responseTimes) < MIN_TIME_RESPONSES:
|
||||||
Connect.queryPage(content=True)
|
Connect.queryPage(content=True)
|
||||||
|
|
||||||
|
if stdev(kb.responseTimes) > WARN_TIME_STDEV:
|
||||||
|
warnMsg = "there are considerable lags in connection "
|
||||||
|
warnMsg += "response(s). please use as high value for "
|
||||||
|
warnMsg += "--time-sec option as possible (e.g. 10)"
|
||||||
|
logger.critical(warnMsg)
|
||||||
|
|
||||||
if conf.safUrl and conf.saFreq > 0:
|
if conf.safUrl and conf.saFreq > 0:
|
||||||
kb.queryCounter += 1
|
kb.queryCounter += 1
|
||||||
if kb.queryCounter % conf.saFreq == 0:
|
if kb.queryCounter % conf.saFreq == 0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user