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

Function genCmpPayload

lib/controller/checks.py:490–501  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

488 if method == PAYLOAD.METHOD.COMPARISON:
489 # Generate payload used for comparison
490 def genCmpPayload():
491 sndPayload = agent.cleanupPayload(test.response.comparison, origValue=value if place not in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER) and BOUNDED_INJECTION_MARKER not in (value or "") else None)
492
493 # Forge response payload by prepending with
494 # boundary's prefix and appending the boundary's
495 # suffix to the test's ' <payload><comment> '
496 # string
497 boundPayload = agent.prefixQuery(sndPayload, prefix, where, clause)
498 boundPayload = agent.suffixQuery(boundPayload, comment, suffix, where)
499 cmpPayload = agent.payload(place, parameter, newValue=boundPayload, where=where)
500
501 return cmpPayload
502
503 # Useful to set kb.matchRatio at first based on False response content
504 kb.matchRatio = None

Callers 1

checkSqlInjectionFunction · 0.85

Calls 4

cleanupPayloadMethod · 0.80
prefixQueryMethod · 0.80
suffixQueryMethod · 0.80
payloadMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…