diff --git a/lib/core/option.py b/lib/core/option.py index 168dfa982..a8939cca7 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -2655,6 +2655,15 @@ def _basicOptionValidation(): errMsg = "invalid regular expression '%s' ('%s')" % (conf.retryOn, getSafeExString(ex)) raise SqlmapSyntaxException(errMsg) + if conf.retries == defaults.retries: + conf.retries = 5 * conf.retries + + warnMsg = "increasing default value for " + warnMsg += "option '--retries' to %d because " % conf.retries + warnMsg += "option '--retry-on' was provided" + logger.warn(warnMsg) + + if conf.cookieDel and len(conf.cookieDel): errMsg = "option '--cookie-del' should contain a single character (e.g. ';')" raise SqlmapSyntaxException(errMsg) diff --git a/lib/core/settings.py b/lib/core/settings.py index ce0e7affa..27a67044e 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.5.11.0" +VERSION = "1.5.11.1" 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/request/connect.py b/lib/request/connect.py index 6580ca0a6..9953db0b1 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -914,11 +914,6 @@ class Connect(object): warnMsg = "forced retry of the request because of undesired page content" logger.warn(warnMsg) return Connect._retryProxy(**kwargs) - else: - errMsg = "unable to get the page content not matching " - errMsg += "the given regular expression '%s'. Please use as high " % conf.retryOn - errMsg += "value for option '--retries' as possible (e.g. 20 or more)" - raise SqlmapConnectionException(errMsg) processResponse(page, responseHeaders, code, status) diff --git a/sqlmap.conf b/sqlmap.conf index 1e436c56d..cc724d3a0 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -161,7 +161,7 @@ timeout = 30 retries = 3 # Retry request on regexp matching content. -retries = 3 +retryOn = # Randomly change value for the given parameter. rParam =