mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-20 18:54:02 +00:00
important update regarding (Bug #209) - probably more will be needed
This commit is contained in:
parent
a921fe0d5d
commit
5a38ac7ea9
21 changed files with 130 additions and 130 deletions
|
|
@ -35,9 +35,6 @@ def forgeHeaders(cookie, ua):
|
|||
|
||||
for header, value in conf.httpHeaders:
|
||||
if cookie and header == "Cookie":
|
||||
if conf.cookieUrlencode:
|
||||
cookie = urlEncodeCookieValues(cookie)
|
||||
|
||||
headers[header] = cookie
|
||||
elif ua and header == "User-Agent":
|
||||
headers[header] = ua
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import urlparse
|
|||
import traceback
|
||||
|
||||
from lib.contrib import multipartpost
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.convert import urlencode
|
||||
|
|
@ -107,7 +108,6 @@ class Connect:
|
|||
get = conf.parameters["GET"]
|
||||
|
||||
if get:
|
||||
get = urlencode(get)
|
||||
url = "%s?%s" % (url, get)
|
||||
requestMsg += "?%s" % get
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ class Connect:
|
|||
cookieStr += "%s; " % cookie[8:index]
|
||||
|
||||
conn = urllib2.urlopen(req)
|
||||
|
||||
|
||||
if not req.has_header("Accept-Encoding"):
|
||||
requestHeaders += "Accept-Encoding: identity\n"
|
||||
|
||||
|
|
@ -307,8 +307,22 @@ class Connect:
|
|||
place = kb.injPlace
|
||||
|
||||
if kb.tamperFunctions:
|
||||
for function in kb.tamperFunctions:
|
||||
value = function(place, value)
|
||||
payload = agent.extractPayload(value)
|
||||
if payload:
|
||||
for function in kb.tamperFunctions:
|
||||
payload = function(payload)
|
||||
value = agent.replacePayload(value, payload)
|
||||
|
||||
if place == "GET":
|
||||
value = agent.removePayloadDelimiters(value, True)
|
||||
elif place == "POST":
|
||||
value = agent.removePayloadDelimiters(value, False)
|
||||
elif place == "Cookie":
|
||||
value = agent.removePayloadDelimiters(value, conf.cookieUrlencode)
|
||||
elif place == "User-Agent":
|
||||
value = agent.removePayloadDelimiters(value, True)
|
||||
elif place == "URI":
|
||||
value = agent.removePayloadDelimiters(value, False)
|
||||
|
||||
if conf.checkPayload:
|
||||
checkPayload(value)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ from lib.core.common import pushValue
|
|||
from lib.core.common import randomInt
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import safeStringFormat
|
||||
from lib.core.convert import urlencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue