From 139448eeb93ce7b770da0b0e845fd837e66823f2 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 19 Mar 2011 16:53:14 +0000 Subject: [PATCH] little stabilization regarding POST url(de/en)coding --- lib/core/option.py | 6 +++++- lib/core/target.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 0758cb70e..e752d6b6c 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1088,6 +1088,7 @@ def __cleanupOptions(): conf.progressWidth = width-46 if conf.testParameter: + conf.testParameter = urldecode(conf.testParameter) conf.testParameter = conf.testParameter.replace(" ", "") conf.testParameter = conf.testParameter.split(",") else: @@ -1135,6 +1136,9 @@ def __cleanupOptions(): if conf.tor: conf.proxy = DEFAULT_TOR_PROXY + if conf.data: + conf.data = urldecode(conf.data) + def __setConfAttributes(): """ This function set some needed attributes into the configuration @@ -1429,9 +1433,9 @@ def init(inputOptions=advancedDict()): __mergeOptions(inputOptions) __setVerbosity() __saveCmdline() + __setRequestFromFile() __cleanupOptions() __basicOptionValidation() - __setRequestFromFile() __setMultipleTargets() __setTamperingFunctions() __setTrafficOutputFP() diff --git a/lib/core/target.py b/lib/core/target.py index ba0de75fc..af70ba4e3 100644 --- a/lib/core/target.py +++ b/lib/core/target.py @@ -68,7 +68,7 @@ def __setRequestParams(): if conf.data: 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 if re.match("[\n]*<(\?xml |soap\:|ns).*>", conf.data):