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

Method connect

plugins/dbms/oracle/connector.py:32–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 """
31
32 def connect(self):
33 self.initConnection()
34
35 self.user = getText(self.user)
36 self.password = getText(self.password)
37
38 try:
39 dsn = oracledb.makedsn(self.hostname, self.port, service_name=self.db)
40 self.connector = oracledb.connect(user=self.user, password=self.password, dsn=dsn, mode=oracledb.AUTH_MODE_SYSDBA)
41 logger.info("successfully connected as SYSDBA")
42 except oracledb.DatabaseError:
43 # Try again without SYSDBA
44 try:
45 self.connector = oracledb.connect(user=self.user, password=self.password, dsn=dsn)
46 except oracledb.DatabaseError as ex:
47 raise SqlmapConnectionException(ex)
48
49 self.initCursor()
50 self.printConnected()
51
52 def fetchall(self):
53 try:

Callers

nothing calls this directly

Calls 6

initConnectionMethod · 0.95
initCursorMethod · 0.95
printConnectedMethod · 0.95
getTextFunction · 0.90
infoMethod · 0.80

Tested by

no test coverage detected