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

Method connect

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

Source from the content-addressed store, hash-verified

30 """
31
32 def connect(self):
33 self.initConnection()
34
35 try:
36 self.connector = psycopg2.connect(host=self.hostname, user=self.user, password=self.password, database=self.db, port=self.port)
37 except (psycopg2.OperationalError, UnicodeDecodeError) as ex:
38 raise SqlmapConnectionException(getSafeExString(ex))
39
40 self.connector.set_client_encoding('UNICODE')
41
42 self.initCursor()
43 self.printConnected()
44
45 def fetchall(self):
46 try:

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected