mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
fixes for sqlite
This commit is contained in:
parent
8702cce760
commit
f0729565a9
|
@ -53,7 +53,7 @@ class Connector(GenericConnector):
|
||||||
try:
|
try:
|
||||||
self.connector = sqlite3.connect(database=self.db, timeout=conf.timeout)
|
self.connector = sqlite3.connect(database=self.db, timeout=conf.timeout)
|
||||||
except sqlite3.OperationalError, msg:
|
except sqlite3.OperationalError, msg:
|
||||||
raise sqlmapConnectionException, msg[1]
|
raise sqlmapConnectionException, msg[0]
|
||||||
|
|
||||||
self.setCursor()
|
self.setCursor()
|
||||||
self.connected()
|
self.connected()
|
||||||
|
@ -62,7 +62,7 @@ class Connector(GenericConnector):
|
||||||
try:
|
try:
|
||||||
return self.cursor.fetchall()
|
return self.cursor.fetchall()
|
||||||
except sqlite3.OperationalError, msg:
|
except sqlite3.OperationalError, msg:
|
||||||
logger.log(8, msg[1])
|
logger.log(8, msg[0])
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def execute(self, query):
|
def execute(self, query):
|
||||||
|
@ -71,9 +71,9 @@ class Connector(GenericConnector):
|
||||||
try:
|
try:
|
||||||
self.cursor.execute(query)
|
self.cursor.execute(query)
|
||||||
except sqlite3.OperationalError, msg:
|
except sqlite3.OperationalError, msg:
|
||||||
logger.log(8, msg[1])
|
logger.log(8, msg[0])
|
||||||
except sqlite3.Error, msg:
|
except sqlite3.Error, msg:
|
||||||
raise sqlmapConnectionException, msg[1]
|
raise sqlmapConnectionException, msg[0]
|
||||||
|
|
||||||
self.connector.commit()
|
self.connector.commit()
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
if not conf.extensiveFp:
|
if not conf.extensiveFp:
|
||||||
return True
|
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 ]
|
kb.dbmsVersion = [ version ]
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user