mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-10 02:01:57 +00:00
changes regarding Data (GET/POST/Cookie) encoding (Bug #129)
This commit is contained in:
parent
1d968f51e9
commit
26c7b74e65
8 changed files with 20 additions and 14 deletions
|
|
@ -26,6 +26,7 @@ import re
|
|||
|
||||
from lib.core.common import randomInt
|
||||
from lib.core.common import randomStr
|
||||
from lib.core.convert import urlencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import queries
|
||||
|
|
@ -77,7 +78,12 @@ class Agent:
|
|||
paramString = conf.parameters[place]
|
||||
retValue = paramString.replace("%s=%s" % (parameter, value),
|
||||
"%s=%s" % (parameter, newValue))
|
||||
|
||||
|
||||
if conf.cookieUrlencode and (kb.injPlace == "Cookie" or place == "Cookie"):
|
||||
name = retValue[:retValue.find('=')]
|
||||
value = retValue[retValue.find('=') + 1:]
|
||||
retValue = "%s=%s" % (name, urlencode(value, convall=True))
|
||||
|
||||
return retValue
|
||||
|
||||
def fullPayload(self, query):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue