mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-15 20:29:04 +00:00
Fix for an Issue #648
This commit is contained in:
@@ -1672,6 +1672,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||
kb.permissionFlag = False
|
||||
kb.postHint = None
|
||||
kb.postSpaceToPlus = False
|
||||
kb.postUrlEncode = True
|
||||
kb.prependFlag = False
|
||||
kb.processResponseCounter = 0
|
||||
kb.previousMethod = None
|
||||
|
||||
@@ -577,11 +577,15 @@ def initTargetEnv():
|
||||
class _(unicode):
|
||||
pass
|
||||
|
||||
original = conf.data
|
||||
conf.data = _(urldecode(conf.data))
|
||||
setattr(conf.data, UNENCODED_ORIGINAL_VALUE, original)
|
||||
|
||||
kb.postSpaceToPlus = '+' in original
|
||||
for key, value in conf.httpHeaders:
|
||||
if key.upper() == HTTP_HEADER.CONTENT_TYPE.upper():
|
||||
kb.postUrlEncode = "urlencoded" in value
|
||||
break
|
||||
if kb.postUrlEncode:
|
||||
original = conf.data
|
||||
conf.data = _(urldecode(conf.data))
|
||||
setattr(conf.data, UNENCODED_ORIGINAL_VALUE, original)
|
||||
kb.postSpaceToPlus = '+' in original
|
||||
|
||||
def setupTargetEnv():
|
||||
_createTargetDirs()
|
||||
|
||||
Reference in New Issue
Block a user