little stabilization regarding POST url(de/en)coding

This commit is contained in:
Miroslav Stampar 2011-03-19 16:53:14 +00:00
parent 0fcd999e51
commit 139448eeb9
2 changed files with 6 additions and 2 deletions

View File

@ -1088,6 +1088,7 @@ def __cleanupOptions():
conf.progressWidth = width-46 conf.progressWidth = width-46
if conf.testParameter: if conf.testParameter:
conf.testParameter = urldecode(conf.testParameter)
conf.testParameter = conf.testParameter.replace(" ", "") conf.testParameter = conf.testParameter.replace(" ", "")
conf.testParameter = conf.testParameter.split(",") conf.testParameter = conf.testParameter.split(",")
else: else:
@ -1135,6 +1136,9 @@ def __cleanupOptions():
if conf.tor: if conf.tor:
conf.proxy = DEFAULT_TOR_PROXY conf.proxy = DEFAULT_TOR_PROXY
if conf.data:
conf.data = urldecode(conf.data)
def __setConfAttributes(): def __setConfAttributes():
""" """
This function set some needed attributes into the configuration This function set some needed attributes into the configuration
@ -1429,9 +1433,9 @@ def init(inputOptions=advancedDict()):
__mergeOptions(inputOptions) __mergeOptions(inputOptions)
__setVerbosity() __setVerbosity()
__saveCmdline() __saveCmdline()
__setRequestFromFile()
__cleanupOptions() __cleanupOptions()
__basicOptionValidation() __basicOptionValidation()
__setRequestFromFile()
__setMultipleTargets() __setMultipleTargets()
__setTamperingFunctions() __setTamperingFunctions()
__setTrafficOutputFP() __setTrafficOutputFP()

View File

@ -68,7 +68,7 @@ def __setRequestParams():
if conf.data: if conf.data:
conf.data = conf.data.replace("\n", " ") conf.data = conf.data.replace("\n", " ")
conf.parameters[PLACE.POST] = urldecode(conf.data) conf.parameters[PLACE.POST] = conf.data
# Check if POST data is in xml syntax # Check if POST data is in xml syntax
if re.match("[\n]*<(\?xml |soap\:|ns).*>", conf.data): if re.match("[\n]*<(\?xml |soap\:|ns).*>", conf.data):