MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / connect

Method connect

plugins/dbms/access/connector.py:31–46  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

29 """
30
31 def connect(self):
32 if not IS_WIN:
33 errMsg = "currently, direct connection to Microsoft Access database(s) "
34 errMsg += "is restricted to Windows platforms"
35 raise SqlmapUnsupportedFeatureException(errMsg)
36
37 self.initConnection()
38 self.checkFileDb()
39
40 try:
41 self.connector = pyodbc.connect('Driver={Microsoft Access Driver (*.mdb)};Dbq=%s;Uid=Admin;Pwd=;' % self.db)
42 except (pyodbc.Error, pyodbc.OperationalError) as ex:
43 raise SqlmapConnectionException(getSafeExString(ex))
44
45 self.initCursor()
46 self.printConnected()
47
48 def fetchall(self):
49 try:

Callers

nothing calls this directly

Calls 7

initConnectionMethod · 0.95
checkFileDbMethod · 0.95
initCursorMethod · 0.95
printConnectedMethod · 0.95
getSafeExStringFunction · 0.90

Tested by

no test coverage detected