mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-23 19:34:13 +03:00
more changes regarding path (URI) injection
This commit is contained in:
parent
78ba5da4f7
commit
ff419f7384
|
@ -102,7 +102,7 @@ class Agent:
|
||||||
# Before identifing the injectable parameter
|
# Before identifing the injectable parameter
|
||||||
elif parameter == "User-Agent":
|
elif parameter == "User-Agent":
|
||||||
retValue = value.replace(value, newValue)
|
retValue = value.replace(value, newValue)
|
||||||
elif parameter == "URI":
|
elif place == "URI":
|
||||||
retValue = value.replace("*", " %s " % newValue.replace(value, str()))
|
retValue = value.replace("*", " %s " % newValue.replace(value, str()))
|
||||||
else:
|
else:
|
||||||
paramString = conf.parameters[place]
|
paramString = conf.parameters[place]
|
||||||
|
|
|
@ -83,10 +83,18 @@ def __setRequestParams():
|
||||||
|
|
||||||
conf.method = "POST"
|
conf.method = "POST"
|
||||||
|
|
||||||
if '*' in conf.url:
|
if "*" in conf.url:
|
||||||
conf.parameters["URI"] = conf.url
|
conf.parameters["URI"] = conf.url
|
||||||
conf.paramDict["URI"] = { "URI": conf.url } # similar as for User-Agent
|
conf.paramDict["URI"] = {}
|
||||||
conf.url = conf.url.replace('*', '')
|
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
|
__testableParameters = True
|
||||||
|
|
||||||
# Perform checks on Cookie parameters
|
# Perform checks on Cookie parameters
|
||||||
|
|
Loading…
Reference in New Issue
Block a user