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

Method payloadDirect

lib/core/agent.py:68–87  ·  view source on GitHub ↗
(self, query)

Source from the content-addressed store, hash-verified

66 """
67
68 def payloadDirect(self, query):
69 query = self.cleanupPayload(query)
70
71 if query.upper().startswith("AND "):
72 query = re.sub(r"(?i)AND ", "SELECT ", query, 1)
73 elif query.upper().startswith(" UNION ALL "):
74 query = re.sub(r"(?i) UNION ALL ", "", query, 1)
75 elif query.startswith("; "):
76 query = query.replace("; ", "", 1)
77
78 if Backend.getIdentifiedDbms() in (DBMS.ORACLE,): # non-standard object(s) make problems to a database connector while returned (e.g. XMLTYPE)
79 _, _, _, _, _, _, fieldsToCastStr, _ = self.getFields(query)
80 for field in fieldsToCastStr.split(','):
81 query = query.replace(field, self.nullAndCastField(field))
82
83 if kb.tamperFunctions:
84 for function in kb.tamperFunctions:
85 query = function(payload=query)
86
87 return query
88
89 def payload(self, place=None, parameter=None, value=None, newValue=None, where=None):
90 """

Callers 4

payloadMethod · 0.95
prefixQueryMethod · 0.95
suffixQueryMethod · 0.95
directFunction · 0.80

Calls 5

cleanupPayloadMethod · 0.95
getFieldsMethod · 0.95
nullAndCastFieldMethod · 0.95
getIdentifiedDbmsMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected