mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Fixes #4869
This commit is contained in:
@@ -7,6 +7,7 @@ See the file 'LICENSE' for copying permission
|
||||
|
||||
import sqlite3
|
||||
|
||||
from lib.core.common import cleanReplaceUnicode
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.common import unsafeSQLIdentificatorNaming
|
||||
from lib.core.exception import SqlmapConnectionException
|
||||
@@ -81,7 +82,10 @@ class Replication(object):
|
||||
|
||||
def execute(self, sql, parameters=None):
|
||||
try:
|
||||
self.parent.cursor.execute(sql, parameters or [])
|
||||
try:
|
||||
self.parent.cursor.execute(sql, parameters or [])
|
||||
except UnicodeError:
|
||||
self.parent.cursor.execute(sql, cleanReplaceUnicode(parameters or []))
|
||||
except sqlite3.OperationalError as ex:
|
||||
errMsg = "problem occurred ('%s') while accessing sqlite database " % getSafeExString(ex, UNICODE_ENCODING)
|
||||
errMsg += "located at '%s'. Please make sure that " % self.parent.dbpath
|
||||
|
||||
Reference in New Issue
Block a user