MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / replacePayload

Method replacePayload

lib/core/agent.py:1241–1247  ·  view source on GitHub ↗

Replaces payload inside the input string with a given payload

(self, value, payload)

Source from the content-addressed store, hash-verified

1239 return extractRegexResult(r"(?s)%s(?P<result>.*?)%s" % (_, _), value)
1240
1241 def replacePayload(self, value, payload):
1242 """
1243 Replaces payload inside the input string with a given payload
1244 """
1245
1246 _ = re.escape(PAYLOAD_DELIMITER)
1247 return re.sub(r"(?s)(%s.*?%s)" % (_, _), ("%s%s%s" % (PAYLOAD_DELIMITER, getUnicode(payload), PAYLOAD_DELIMITER)).replace("\\", r"\\"), value) if value else value
1248
1249 def runAsDBMSUser(self, query):
1250 if conf.dbmsCred and "Ad Hoc Distributed Queries" not in query:

Callers 2

queryPageMethod · 0.80
tryHintFunction · 0.80

Calls 3

getUnicodeFunction · 0.90
escapeMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected