diff --git a/lib/core/agent.py b/lib/core/agent.py index fa6673223..32c601db2 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -102,7 +102,7 @@ class Agent: # Before identifing the injectable parameter elif parameter == "User-Agent": retValue = value.replace(value, newValue) - elif parameter == "URI": + elif place == "URI": retValue = value.replace("*", " %s " % newValue.replace(value, str())) else: paramString = conf.parameters[place] diff --git a/lib/core/target.py b/lib/core/target.py index 7866082f8..67e47cabf 100644 --- a/lib/core/target.py +++ b/lib/core/target.py @@ -83,10 +83,18 @@ def __setRequestParams(): conf.method = "POST" - if '*' in conf.url: + if "*" in conf.url: conf.parameters["URI"] = conf.url - conf.paramDict["URI"] = { "URI": conf.url } # similar as for User-Agent - conf.url = conf.url.replace('*', '') + conf.paramDict["URI"] = {} + parts = conf.url.split("*") + for i in range(len(parts)-1): + result = str() + for j in range(len(parts)): + result += parts[j] + if i == j: + result += "*" + conf.paramDict["URI"]["#%d" % (i+1)] = result + conf.url = conf.url.replace("*", str()) __testableParameters = True # Perform checks on Cookie parameters