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

Method getSchema

plugins/generic/databases.py:936–965  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

934
935 @stackedmethod
936 def getSchema(self):
937 infoMsg = "enumerating database management system schema"
938 logger.info(infoMsg)
939
940 try:
941 pushValue(conf.db)
942 pushValue(conf.tbl)
943 pushValue(conf.col)
944
945 kb.data.cachedTables = {}
946 kb.data.cachedColumns = {}
947
948 self.getTables()
949
950 infoMsg = "fetched tables: "
951 infoMsg += ", ".join(["%s" % ", ".join("'%s%s%s'" % (unsafeSQLIdentificatorNaming(db), ".." if Backend.isDbms(DBMS.MSSQL) or Backend.isDbms(DBMS.SYBASE) else '.', unsafeSQLIdentificatorNaming(_)) if db else "'%s'" % unsafeSQLIdentificatorNaming(_) for _ in tbl) for db, tbl in kb.data.cachedTables.items()])
952 logger.info(infoMsg)
953
954 for db, tables in kb.data.cachedTables.items():
955 for tbl in tables:
956 conf.db = db
957 conf.tbl = tbl
958
959 self.getColumns()
960 finally:
961 conf.col = popValue()
962 conf.tbl = popValue()
963 conf.db = popValue()
964
965 return kb.data.cachedColumns
966
967 def _tableGetCount(self, db, table):
968 if not db or not table:

Callers 1

actionFunction · 0.80

Calls 8

getTablesMethod · 0.95
getColumnsMethod · 0.95
pushValueFunction · 0.90
popValueFunction · 0.90
infoMethod · 0.80
isDbmsMethod · 0.80
itemsMethod · 0.80

Tested by

no test coverage detected