mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Patch for an Issue #545
This commit is contained in:
parent
7cb7c6361f
commit
304c9822bd
|
@ -961,14 +961,16 @@ class Agent(object):
|
|||
Extracts payload from inside of the input string
|
||||
"""
|
||||
|
||||
return extractRegexResult("(?s)%s(?P<result>.*?)%s" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER), inpStr)
|
||||
_ = re.escape(PAYLOAD_DELIMITER)
|
||||
return extractRegexResult("(?s)%s(?P<result>.*?)%s" % (_, _), inpStr)
|
||||
|
||||
def replacePayload(self, inpStr, payload):
|
||||
"""
|
||||
Replaces payload inside the input string with a given payload
|
||||
"""
|
||||
|
||||
return re.sub("(%s.*?%s)" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER), ("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER)).replace("\\", r"\\"), inpStr) if inpStr else inpStr
|
||||
_ = re.escape(PAYLOAD_DELIMITER)
|
||||
return re.sub("(%s.*?%s)" % (_, _), ("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER)).replace("\\", r"\\"), inpStr) if inpStr else inpStr
|
||||
|
||||
def runAsDBMSUser(self, query):
|
||||
if conf.dbmsCred and "Ad Hoc Distributed Queries" not in query:
|
||||
|
|
|
@ -43,7 +43,7 @@ URI_QUESTION_MARKER = "__QUESTION_MARK__"
|
|||
ASTERISK_MARKER = "__ASTERISK_MARK__"
|
||||
REPLACEMENT_MARKER = "__REPLACEMENT_MARK__"
|
||||
|
||||
PAYLOAD_DELIMITER = "\x00"
|
||||
PAYLOAD_DELIMITER = "\x00\x00\x00"
|
||||
CHAR_INFERENCE_MARK = "%c"
|
||||
PRINTABLE_CHAR_REGEX = r"[^\x00-\x1f\x7f-\xff]"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user