Implements option --retry-on (#4876)

This commit is contained in:
Miroslav Stampar
2021-11-01 21:50:16 +01:00
parent fc9875fc12
commit 9e17babe7b
6 changed files with 26 additions and 1 deletions

View File

@@ -2648,6 +2648,13 @@ def _basicOptionValidation():
errMsg = "invalid regular expression '%s' ('%s')" % (conf.paramExclude, getSafeExString(ex))
raise SqlmapSyntaxException(errMsg)
if conf.retryOn:
try:
re.compile(conf.retryOn)
except Exception as ex:
errMsg = "invalid regular expression '%s' ('%s')" % (conf.retryOn, getSafeExString(ex))
raise SqlmapSyntaxException(errMsg)
if conf.cookieDel and len(conf.cookieDel):
errMsg = "option '--cookie-del' should contain a single character (e.g. ';')"
raise SqlmapSyntaxException(errMsg)