mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
adding --force-ssl switch (most useful in combination with -r)
This commit is contained in:
parent
11887f331d
commit
6bedb80ffa
|
@ -1268,7 +1268,7 @@ def parseTargetUrl():
|
||||||
__urlSplit = urlparse.urlsplit(conf.url)
|
__urlSplit = urlparse.urlsplit(conf.url)
|
||||||
__hostnamePort = __urlSplit[1].split(":")
|
__hostnamePort = __urlSplit[1].split(":")
|
||||||
|
|
||||||
conf.scheme = __urlSplit[0].strip()
|
conf.scheme = __urlSplit[0].strip() if not conf.forceSSL else "https"
|
||||||
conf.path = __urlSplit[2].strip()
|
conf.path = __urlSplit[2].strip()
|
||||||
conf.hostname = __hostnamePort[0].strip()
|
conf.hostname = __hostnamePort[0].strip()
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ optDict = {
|
||||||
"agent": "string",
|
"agent": "string",
|
||||||
"randomAgent": "boolean",
|
"randomAgent": "boolean",
|
||||||
"rParam": "string",
|
"rParam": "string",
|
||||||
|
"forceSSL": "boolean",
|
||||||
"host": "string",
|
"host": "string",
|
||||||
"referer": "string",
|
"referer": "string",
|
||||||
"headers": "string",
|
"headers": "string",
|
||||||
|
|
|
@ -92,6 +92,10 @@ def cmdLineParser():
|
||||||
request.add_option("--randomize", dest="rParam",
|
request.add_option("--randomize", dest="rParam",
|
||||||
help="Randomly change value for given parameter(s)")
|
help="Randomly change value for given parameter(s)")
|
||||||
|
|
||||||
|
request.add_option("--force-ssl", dest="forceSSL",
|
||||||
|
action="store_true",
|
||||||
|
help="Force usage of SSL/HTTPS requests")
|
||||||
|
|
||||||
request.add_option("--host", dest="host",
|
request.add_option("--host", dest="host",
|
||||||
help="HTTP Host header")
|
help="HTTP Host header")
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,10 @@ referer =
|
||||||
# Randomly change value for the given parameter
|
# Randomly change value for the given parameter
|
||||||
rParam =
|
rParam =
|
||||||
|
|
||||||
|
# Force usage of SSL/HTTPS requests
|
||||||
|
# Valid: True or False
|
||||||
|
forceSSL = False
|
||||||
|
|
||||||
# Extra HTTP headers
|
# Extra HTTP headers
|
||||||
headers = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
|
headers = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
|
||||||
Accept-Language: en-us,en;q=0.5
|
Accept-Language: en-us,en;q=0.5
|
||||||
|
|
Loading…
Reference in New Issue
Block a user