mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +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)
|
||||
__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.hostname = __hostnamePort[0].strip()
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ optDict = {
|
|||
"agent": "string",
|
||||
"randomAgent": "boolean",
|
||||
"rParam": "string",
|
||||
"forceSSL": "boolean",
|
||||
"host": "string",
|
||||
"referer": "string",
|
||||
"headers": "string",
|
||||
|
|
|
@ -92,6 +92,10 @@ def cmdLineParser():
|
|||
request.add_option("--randomize", dest="rParam",
|
||||
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",
|
||||
help="HTTP Host header")
|
||||
|
||||
|
|
|
@ -69,6 +69,10 @@ referer =
|
|||
# Randomly change value for the given parameter
|
||||
rParam =
|
||||
|
||||
# Force usage of SSL/HTTPS requests
|
||||
# Valid: True or False
|
||||
forceSSL = False
|
||||
|
||||
# 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
|
||||
Accept-Language: en-us,en;q=0.5
|
||||
|
|
Loading…
Reference in New Issue
Block a user