Small patch for existing option validation

This commit is contained in:
Miroslav Stampar 2015-04-22 15:32:14 +02:00
parent 77c96de4ea
commit 4ded9a9966

View File

@ -2261,6 +2261,14 @@ def _basicOptionValidation():
errMsg = "option '--crawl-exclude' requires usage of switch '--crawl'" errMsg = "option '--crawl-exclude' requires usage of switch '--crawl'"
raise SqlmapSyntaxException(errMsg) raise SqlmapSyntaxException(errMsg)
if conf.safePost and not conf.safeUrl:
errMsg = "option '--safe-post' requires usage of option '--safe-url'"
raise SqlmapSyntaxException(errMsg)
if conf.safeFreq and not conf.safeUrl:
errMsg = "option '--safe-freq' requires usage of option '--safe-url'"
raise SqlmapSyntaxException(errMsg)
if conf.csrfUrl and not conf.csrfToken: if conf.csrfUrl and not conf.csrfToken:
errMsg = "option '--csrf-url' requires usage of option '--csrf-token'" errMsg = "option '--csrf-url' requires usage of option '--csrf-token'"
raise SqlmapSyntaxException(errMsg) raise SqlmapSyntaxException(errMsg)