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

Method preprocessField

lib/core/agent.py:657–674  ·  view source on GitHub ↗

Does a field preprocessing (if needed) based on its type (e.g. image to text) Note: used primarily in dumping of custom tables

(self, table, field)

Source from the content-addressed store, hash-verified

655 return rootQuery.concatenate.query % (first, second)
656
657 def preprocessField(self, table, field):
658 """
659 Does a field preprocessing (if needed) based on its type (e.g. image to text)
660 Note: used primarily in dumping of custom tables
661 """
662
663 retVal = field
664 if conf.db and table and conf.db in table:
665 table = table.split(conf.db)[-1].strip('.')
666 try:
667 columns = kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)][safeSQLIdentificatorNaming(table, True)]
668 for name, type_ in columns.items():
669 if type_ and type_.upper() in DUMP_DATA_PREPROCESS.get(Backend.getDbms(), {}) and name == field:
670 retVal = DUMP_DATA_PREPROCESS[Backend.getDbms()][type_.upper()] % name
671 break
672 except KeyError:
673 pass
674 return retVal
675
676 def concatQuery(self, query, unpack=True):
677 """

Callers 2

_Function · 0.80
dumpTableMethod · 0.80

Calls 4

itemsMethod · 0.80
getMethod · 0.45
getDbmsMethod · 0.45

Tested by

no test coverage detected