From f936746423aaaa8868c25a779038bb081c2af50c Mon Sep 17 00:00:00 2001 From: stamparm Date: Mon, 15 Apr 2013 14:31:27 +0200 Subject: [PATCH] Code restyling --- lib/utils/sqlalchemy.py | 2 +- plugins/dbms/access/connector.py | 2 +- plugins/dbms/db2/connector.py | 2 +- plugins/dbms/firebird/connector.py | 3 ++- plugins/dbms/mssqlserver/connector.py | 2 +- plugins/dbms/mysql/connector.py | 2 +- plugins/dbms/oracle/connector.py | 2 +- plugins/dbms/postgresql/connector.py | 2 +- plugins/dbms/sqlite/connector.py | 2 +- plugins/dbms/sybase/connector.py | 2 +- plugins/generic/connector.py | 2 +- 11 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/utils/sqlalchemy.py b/lib/utils/sqlalchemy.py index b7cc56ce3..3d6ae0c2a 100644 --- a/lib/utils/sqlalchemy.py +++ b/lib/utils/sqlalchemy.py @@ -41,7 +41,7 @@ class SQLAlchemy(GenericConnector): except Exception, msg: raise SqlmapConnectionException(msg[0]) - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/access/connector.py b/plugins/dbms/access/connector.py index 40160f0f2..ba8870cfd 100644 --- a/plugins/dbms/access/connector.py +++ b/plugins/dbms/access/connector.py @@ -46,7 +46,7 @@ class Connector(GenericConnector): raise SqlmapConnectionException(msg[1]) self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/db2/connector.py b/plugins/dbms/db2/connector.py index 797593178..1df06c9ea 100644 --- a/plugins/dbms/db2/connector.py +++ b/plugins/dbms/db2/connector.py @@ -39,7 +39,7 @@ class Connector(GenericConnector): self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/firebird/connector.py b/plugins/dbms/firebird/connector.py index 976f91a30..b8a2a6bcb 100644 --- a/plugins/dbms/firebird/connector.py +++ b/plugins/dbms/firebird/connector.py @@ -43,8 +43,9 @@ 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 except kinterbasdb.OperationalError, msg: raise SqlmapConnectionException(msg[1]) + self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/mssqlserver/connector.py b/plugins/dbms/mssqlserver/connector.py index 7eb0a82bb..0b39b1417 100644 --- a/plugins/dbms/mssqlserver/connector.py +++ b/plugins/dbms/mssqlserver/connector.py @@ -45,7 +45,7 @@ class Connector(GenericConnector): raise SqlmapConnectionException(msg) self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/mysql/connector.py b/plugins/dbms/mysql/connector.py index 54327d9d9..19f4cf43a 100644 --- a/plugins/dbms/mysql/connector.py +++ b/plugins/dbms/mysql/connector.py @@ -40,7 +40,7 @@ class Connector(GenericConnector): raise SqlmapConnectionException(msg[1]) self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/oracle/connector.py b/plugins/dbms/oracle/connector.py index a536d5fa5..161b4efd5 100644 --- a/plugins/dbms/oracle/connector.py +++ b/plugins/dbms/oracle/connector.py @@ -49,7 +49,7 @@ class Connector(GenericConnector): raise SqlmapConnectionException(msg) self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/postgresql/connector.py b/plugins/dbms/postgresql/connector.py index 1caf42602..b6d56bd25 100644 --- a/plugins/dbms/postgresql/connector.py +++ b/plugins/dbms/postgresql/connector.py @@ -42,7 +42,7 @@ class Connector(GenericConnector): self.connector.set_client_encoding('UNICODE') self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/sqlite/connector.py b/plugins/dbms/sqlite/connector.py index 7352cc733..751be07ab 100644 --- a/plugins/dbms/sqlite/connector.py +++ b/plugins/dbms/sqlite/connector.py @@ -64,7 +64,7 @@ class Connector(GenericConnector): raise SqlmapConnectionException(msg[0]) self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/dbms/sybase/connector.py b/plugins/dbms/sybase/connector.py index c859f9632..76e61e71b 100644 --- a/plugins/dbms/sybase/connector.py +++ b/plugins/dbms/sybase/connector.py @@ -45,7 +45,7 @@ class Connector(GenericConnector): raise SqlmapConnectionException(msg) self.initCursor() - self.connected() + self.printConnected() def fetchall(self): try: diff --git a/plugins/generic/connector.py b/plugins/generic/connector.py index 002018a14..185aeff6b 100644 --- a/plugins/generic/connector.py +++ b/plugins/generic/connector.py @@ -29,7 +29,7 @@ class Connector: self.port = conf.port self.db = conf.dbmsDb - def connected(self): + def printConnected(self): infoMsg = "connection to %s server %s" % (conf.dbms, self.hostname) infoMsg += ":%d established" % self.port logger.info(infoMsg)