mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-01 20:39:03 +00:00
Update for an Issue #431
This commit is contained in:
@@ -269,7 +269,7 @@ def start():
|
||||
for targetUrl, targetMethod, targetData, targetCookie, targetHeaders in kb.targets:
|
||||
try:
|
||||
conf.url = targetUrl
|
||||
conf.method = targetMethod
|
||||
conf.method = targetMethod.upper() if targetMethod else targetMethod
|
||||
conf.data = targetData
|
||||
conf.cookie = targetCookie
|
||||
conf.httpHeaders = list(initialHeaders)
|
||||
|
||||
@@ -23,6 +23,7 @@ optDict = {
|
||||
},
|
||||
|
||||
"Request": {
|
||||
"method": "string",
|
||||
"data": "string",
|
||||
"paramDel": "string",
|
||||
"cookie": "string",
|
||||
|
||||
@@ -90,6 +90,9 @@ def cmdLineParser():
|
||||
request = OptionGroup(parser, "Request", "These options can be used "
|
||||
"to specify how to connect to the target URL")
|
||||
|
||||
request.add_option("--method", dest="method",
|
||||
help="Force usage of given HTTP method (e.g. PUT)")
|
||||
|
||||
request.add_option("--data", dest="data",
|
||||
help="Data string to be sent through POST")
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ class Connect(object):
|
||||
url = "%s?%s" % (url, get)
|
||||
requestMsg += "?%s" % get
|
||||
|
||||
if PLACE.POST in conf.parameters and not post and method in (None, HTTPMETHOD.POST):
|
||||
if PLACE.POST in conf.parameters and not post and method != HTTPMETHOD.GET:
|
||||
post = conf.parameters[PLACE.POST]
|
||||
|
||||
elif get:
|
||||
@@ -634,6 +634,7 @@ class Connect(object):
|
||||
auxHeaders = {}
|
||||
|
||||
raise404 = place != PLACE.URI if raise404 is None else raise404
|
||||
method = method or conf.method
|
||||
|
||||
value = agent.adjustLateValues(value)
|
||||
payload = agent.extractPayload(value)
|
||||
|
||||
Reference in New Issue
Block a user