diff --git a/plugins/dbms/sqlite/connector.py b/plugins/dbms/sqlite/connector.py index edf8561aa..3d271d7a9 100644 --- a/plugins/dbms/sqlite/connector.py +++ b/plugins/dbms/sqlite/connector.py @@ -53,7 +53,7 @@ class Connector(GenericConnector): try: self.connector = sqlite3.connect(database=self.db, timeout=conf.timeout) except sqlite3.OperationalError, msg: - raise sqlmapConnectionException, msg[1] + raise sqlmapConnectionException, msg[0] self.setCursor() self.connected() @@ -62,7 +62,7 @@ class Connector(GenericConnector): try: return self.cursor.fetchall() except sqlite3.OperationalError, msg: - logger.log(8, msg[1]) + logger.log(8, msg[0]) return None def execute(self, query): @@ -71,9 +71,9 @@ class Connector(GenericConnector): try: self.cursor.execute(query) except sqlite3.OperationalError, msg: - logger.log(8, msg[1]) + logger.log(8, msg[0]) except sqlite3.Error, msg: - raise sqlmapConnectionException, msg[1] + raise sqlmapConnectionException, msg[0] self.connector.commit() diff --git a/plugins/dbms/sqlite/fingerprint.py b/plugins/dbms/sqlite/fingerprint.py index 2839d6b06..c0e5750c1 100644 --- a/plugins/dbms/sqlite/fingerprint.py +++ b/plugins/dbms/sqlite/fingerprint.py @@ -117,7 +117,7 @@ class Fingerprint(GenericFingerprint): if not conf.extensiveFp: return True - version = inject.getValue("SUBSTR((SQLITE_VERSION()), 1, 1)", unpack=False, charsetType=2) + version = inject.getValue("SELECT SUBSTR((SQLITE_VERSION()), 1, 1)", unpack=False, charsetType=2) kb.dbmsVersion = [ version ] return True