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

Method connect

plugins/dbms/cache/connector.py:33–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 """
32
33 def connect(self):
34 self.initConnection()
35 try:
36 msg = "please enter the location of 'cachejdbc.jar'? "
37 jar = readInput(msg)
38 checkFile(jar)
39 args = "-Djava.class.path=%s" % jar
40 jvm_path = jpype.getDefaultJVMPath()
41 jpype.startJVM(jvm_path, args)
42 except Exception as ex:
43 raise SqlmapConnectionException(getSafeExString(ex))
44
45 try:
46 driver = 'com.intersys.jdbc.CacheDriver'
47 connection_string = 'jdbc:Cache://%s:%d/%s' % (self.hostname, self.port, self.db)
48 self.connector = jaydebeapi.connect(driver, connection_string, str(self.user), str(self.password))
49 except Exception as ex:
50 raise SqlmapConnectionException(getSafeExString(ex))
51
52 self.initCursor()
53 self.printConnected()
54
55 def fetchall(self):
56 try:

Callers

nothing calls this directly

Calls 7

initConnectionMethod · 0.95
initCursorMethod · 0.95
printConnectedMethod · 0.95
readInputFunction · 0.90
checkFileFunction · 0.90
getSafeExStringFunction · 0.90

Tested by

no test coverage detected