mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-09 16:19:07 +00:00
Adding an option --safe-post
This commit is contained in:
@@ -51,6 +51,7 @@ optDict = {
|
||||
"retries": "integer",
|
||||
"rParam": "string",
|
||||
"safUrl": "string",
|
||||
"safPost": "string",
|
||||
"saFreq": "integer",
|
||||
"skipUrlEncode": "boolean",
|
||||
"csrfToken": "string",
|
||||
|
||||
@@ -188,6 +188,9 @@ def cmdLineParser():
|
||||
request.add_option("--safe-url", dest="safUrl",
|
||||
help="URL address to visit frequently during testing")
|
||||
|
||||
request.add_option("--safe-post", dest="safPost",
|
||||
help="POST data to send to a safe URL")
|
||||
|
||||
request.add_option("--safe-freq", dest="saFreq", type="int",
|
||||
help="Test requests between two visits to a given safe URL")
|
||||
|
||||
|
||||
@@ -971,11 +971,10 @@ class Connect(object):
|
||||
warnMsg += "10 or more)"
|
||||
logger.critical(warnMsg)
|
||||
|
||||
|
||||
if conf.safUrl and conf.saFreq > 0:
|
||||
kb.queryCounter += 1
|
||||
if kb.queryCounter % conf.saFreq == 0:
|
||||
Connect.getPage(url=conf.safUrl, cookie=cookie, direct=True, silent=True, ua=ua, referer=referer, host=host)
|
||||
Connect.getPage(url=conf.safUrl, post=conf.safPost, cookie=cookie, direct=True, silent=True, ua=ua, referer=referer, host=host)
|
||||
|
||||
start = time.time()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user