fixes for sqlite

This commit is contained in:
Miroslav Stampar 2010-03-30 13:36:23 +00:00
parent 8702cce760
commit f0729565a9
2 changed files with 5 additions and 5 deletions

View File

@ -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()

View File

@ -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