mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Proper fix for re.sub() call with repl value containing backslash
This commit is contained in:
parent
28529a92a7
commit
fabbe63f00
|
@ -142,7 +142,7 @@ class Agent(object):
|
|||
elif place in (PLACE.USER_AGENT, PLACE.REFERER, PLACE.HOST):
|
||||
retVal = paramString.replace(origValue, self.addPayloadDelimiters(newValue))
|
||||
else:
|
||||
retVal = re.sub(r"(\A|\b)%s=%s" % (re.escape(parameter), re.escape(origValue)), "%s=%s" % (re.escape(parameter), re.escape(self.addPayloadDelimiters(newValue))), paramString)
|
||||
retVal = re.sub(r"(\A|\b)%s=%s" % (re.escape(parameter), re.escape(origValue)), "%s=%s" % (parameter, self.addPayloadDelimiters(newValue.replace("\\", "\\\\"))), paramString)
|
||||
|
||||
return retVal
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user