Better naming

This commit is contained in:
Miroslav Stampar 2013-01-18 11:21:23 +01:00
parent 4d5bae7131
commit e7576a3b11
10 changed files with 10 additions and 13 deletions

View File

@ -45,7 +45,7 @@ class Connector(GenericConnector):
except (pyodbc.Error, pyodbc.OperationalError), msg: except (pyodbc.Error, pyodbc.OperationalError), msg:
raise SqlmapConnectionException(msg[1]) raise SqlmapConnectionException(msg[1])
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -38,7 +38,7 @@ class Connector(GenericConnector):
raise SqlmapConnectionException(msg) raise SqlmapConnectionException(msg)
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -43,7 +43,7 @@ class Connector(GenericConnector):
user=self.user.encode(UNICODE_ENCODING), password=self.password.encode(UNICODE_ENCODING), charset="UTF8") # Reference: http://www.daniweb.com/forums/thread248499.html user=self.user.encode(UNICODE_ENCODING), password=self.password.encode(UNICODE_ENCODING), charset="UTF8") # Reference: http://www.daniweb.com/forums/thread248499.html
except kinterbasdb.OperationalError, msg: except kinterbasdb.OperationalError, msg:
raise SqlmapConnectionException(msg[1]) raise SqlmapConnectionException(msg[1])
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -44,7 +44,7 @@ class Connector(GenericConnector):
except pymssql.OperationalError, msg: except pymssql.OperationalError, msg:
raise SqlmapConnectionException(msg) raise SqlmapConnectionException(msg)
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -39,7 +39,7 @@ class Connector(GenericConnector):
except (pymysql.OperationalError, pymysql.InternalError), msg: except (pymysql.OperationalError, pymysql.InternalError), msg:
raise SqlmapConnectionException(msg[1]) raise SqlmapConnectionException(msg[1])
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -48,7 +48,7 @@ class Connector(GenericConnector):
except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError), msg: except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError), msg:
raise SqlmapConnectionException(msg) raise SqlmapConnectionException(msg)
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -41,7 +41,7 @@ class Connector(GenericConnector):
self.connector.set_client_encoding('UNICODE') self.connector.set_client_encoding('UNICODE')
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -63,7 +63,7 @@ class Connector(GenericConnector):
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg: except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
raise SqlmapConnectionException(msg[0]) raise SqlmapConnectionException(msg[0])
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -44,7 +44,7 @@ class Connector(GenericConnector):
except pymssql.OperationalError, msg: except pymssql.OperationalError, msg:
raise SqlmapConnectionException(msg) raise SqlmapConnectionException(msg)
self.setCursor() self.initCursor()
self.connected() self.connected()
def fetchall(self): def fetchall(self):

View File

@ -41,12 +41,9 @@ class Connector:
self.connector = None self.connector = None
self.cursor = None self.cursor = None
def setCursor(self): def initCursor(self):
self.cursor = self.connector.cursor() self.cursor = self.connector.cursor()
def getCursor(self):
return self.cursor
def close(self): def close(self):
try: try:
self.cursor.close() self.cursor.close()