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

Method _sysTablesCheck

plugins/dbms/access/fingerprint.py:45–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43 return retVal
44
45 def _sysTablesCheck(self):
46 infoMsg = "executing system table(s) existence fingerprint"
47 logger.info(infoMsg)
48
49 # Microsoft Access table reference updated on 01/2010
50 sysTables = {
51 "97": ("MSysModules2", "MSysAccessObjects"),
52 "2000": ("!MSysModules2", "MSysAccessObjects"),
53 "2002-2003": ("MSysAccessStorage", "!MSysNavPaneObjectIDs"),
54 "2007": ("MSysAccessStorage", "MSysNavPaneObjectIDs"),
55 }
56
57 # MSysAccessXML is not a reliable system table because it doesn't always exist
58 # ("Access through Access", p6, should be "normally doesn't exist" instead of "is normally empty")
59
60 for version, tables in sysTables.items():
61 exist = True
62
63 for table in tables:
64 negate = False
65
66 if table[0] == '!':
67 negate = True
68 table = table[1:]
69
70 result = inject.checkBooleanExpression("EXISTS(SELECT * FROM %s WHERE [RANDNUM]=[RANDNUM])" % table)
71 if result is None:
72 result = False
73
74 if negate:
75 result = not result
76
77 exist &= result
78
79 if not exist:
80 break
81
82 if exist:
83 return version
84
85 return None
86
87 def _getDatabaseDir(self):
88 retVal = None

Callers 1

checkDbmsMethod · 0.95

Calls 2

infoMethod · 0.80
itemsMethod · 0.80

Tested by

no test coverage detected