adding --force-ssl switch (most useful in combination with -r)

This commit is contained in:
Miroslav Stampar 2012-02-08 09:11:57 +00:00
parent 11887f331d
commit 6bedb80ffa
4 changed files with 10 additions and 1 deletions

View File

@ -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()

View File

@ -31,6 +31,7 @@ optDict = {
"agent": "string",
"randomAgent": "boolean",
"rParam": "string",
"forceSSL": "boolean",
"host": "string",
"referer": "string",
"headers": "string",

View File

@ -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")

View File

@ -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