From 98582d5ac6a10c7d14159a503e5585b77e8bcf2a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 4 Jun 2019 15:46:56 +0200 Subject: [PATCH] Minor update --- lib/controller/checks.py | 5 +++-- lib/core/settings.py | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 69bbc2fea..4c791e4d1 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -83,6 +83,7 @@ from lib.core.settings import IPS_WAF_CHECK_PAYLOAD from lib.core.settings import IPS_WAF_CHECK_RATIO from lib.core.settings import IPS_WAF_CHECK_TIMEOUT from lib.core.settings import MAX_DIFFLIB_SEQUENCE_LENGTH +from lib.core.settings import MAX_STABILITY_DELAY from lib.core.settings import NON_SQLI_CHECK_PREFIX_SUFFIX_LENGTH from lib.core.settings import PRECONNECT_INCOMPATIBLE_SERVERS from lib.core.settings import SINGLE_QUOTE_MARKER @@ -1222,8 +1223,8 @@ def checkStability(): firstPage = kb.originalPage # set inside checkConnection() - delay = 1 - (time.time() - (kb.originalPageTime or 0)) - delay = max(0, min(1, delay)) + delay = MAX_STABILITY_DELAY - (time.time() - (kb.originalPageTime or 0)) + delay = max(0, min(MAX_STABILITY_DELAY, delay)) time.sleep(delay) secondPage, _, _ = Request.queryPage(content=True, noteResponseTime=False, raise404=False) diff --git a/lib/core/settings.py b/lib/core/settings.py index 58f3aa456..4e003baa9 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.6.15" +VERSION = "1.3.6.16" 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) @@ -648,6 +648,9 @@ MAX_SINGLE_URL_REDIRECTIONS = 4 # Maximum total number of redirections (regardless of URL) - before assuming we're in a loop MAX_TOTAL_REDIRECTIONS = 10 +# Maximum (deliberate) delay used in page stability check +MAX_STABILITY_DELAY = 0.5 + # Reference: http://www.tcpipguide.com/free/t_DNSLabelsNamesandSyntaxRules.htm MAX_DNS_LABEL = 63