mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Adding an option --safe-post
This commit is contained in:
parent
7517db76d1
commit
349dfbf2ae
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1,4 +1,5 @@
|
||||||
*.py text eol=lf
|
*.py text eol=lf
|
||||||
|
*.conf text eol=lf
|
||||||
|
|
||||||
*_ binary
|
*_ binary
|
||||||
*.dll binary
|
*.dll binary
|
||||||
|
|
|
@ -51,6 +51,7 @@ optDict = {
|
||||||
"retries": "integer",
|
"retries": "integer",
|
||||||
"rParam": "string",
|
"rParam": "string",
|
||||||
"safUrl": "string",
|
"safUrl": "string",
|
||||||
|
"safPost": "string",
|
||||||
"saFreq": "integer",
|
"saFreq": "integer",
|
||||||
"skipUrlEncode": "boolean",
|
"skipUrlEncode": "boolean",
|
||||||
"csrfToken": "string",
|
"csrfToken": "string",
|
||||||
|
|
|
@ -188,6 +188,9 @@ def cmdLineParser():
|
||||||
request.add_option("--safe-url", dest="safUrl",
|
request.add_option("--safe-url", dest="safUrl",
|
||||||
help="URL address to visit frequently during testing")
|
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",
|
request.add_option("--safe-freq", dest="saFreq", type="int",
|
||||||
help="Test requests between two visits to a given safe URL")
|
help="Test requests between two visits to a given safe URL")
|
||||||
|
|
||||||
|
|
|
@ -971,11 +971,10 @@ class Connect(object):
|
||||||
warnMsg += "10 or more)"
|
warnMsg += "10 or more)"
|
||||||
logger.critical(warnMsg)
|
logger.critical(warnMsg)
|
||||||
|
|
||||||
|
|
||||||
if conf.safUrl and conf.saFreq > 0:
|
if conf.safUrl and conf.saFreq > 0:
|
||||||
kb.queryCounter += 1
|
kb.queryCounter += 1
|
||||||
if kb.queryCounter % conf.saFreq == 0:
|
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()
|
start = time.time()
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,10 @@ rParam =
|
||||||
# Example: http://192.168.1.121/index.html
|
# Example: http://192.168.1.121/index.html
|
||||||
safUrl =
|
safUrl =
|
||||||
|
|
||||||
|
# POST data to send to a safe URL.
|
||||||
|
# Example: username=admin&password=passw0rd!
|
||||||
|
safPost =
|
||||||
|
|
||||||
# Test requests between two visits to a given safe URL (default 0).
|
# Test requests between two visits to a given safe URL (default 0).
|
||||||
# Valid: integer
|
# Valid: integer
|
||||||
# Default: 0
|
# Default: 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user