mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-21 23:51:09 +00:00
Fix for --dump-format=SQLITE with double quotes in names
This commit is contained in:
parent
77a31ee595
commit
6aa218f720
2 changed files with 4 additions and 4 deletions
|
|
@ -58,15 +58,15 @@ class Replication(object):
|
|||
|
||||
def __init__(self, parent, name, columns=None, create=True, typeless=False):
|
||||
self.parent = parent
|
||||
self.name = unsafeSQLIdentificatorNaming(name)
|
||||
self.name = unsafeSQLIdentificatorNaming(name).replace('"', '""') # Note: escaped for its (double quoted) usage in statements below
|
||||
self.columns = columns
|
||||
if create:
|
||||
try:
|
||||
self.execute('DROP TABLE IF EXISTS "%s"' % self.name)
|
||||
if not typeless:
|
||||
self.execute('CREATE TABLE "%s" (%s)' % (self.name, ','.join('"%s" %s' % (unsafeSQLIdentificatorNaming(colname), coltype) for colname, coltype in self.columns)))
|
||||
self.execute('CREATE TABLE "%s" (%s)' % (self.name, ','.join('"%s" %s' % (unsafeSQLIdentificatorNaming(colname).replace('"', '""'), coltype) for colname, coltype in self.columns)))
|
||||
else:
|
||||
self.execute('CREATE TABLE "%s" (%s)' % (self.name, ','.join('"%s"' % unsafeSQLIdentificatorNaming(colname) for colname in self.columns)))
|
||||
self.execute('CREATE TABLE "%s" (%s)' % (self.name, ','.join('"%s"' % unsafeSQLIdentificatorNaming(colname).replace('"', '""') for colname in self.columns)))
|
||||
except Exception as ex:
|
||||
errMsg = "problem occurred ('%s') while initializing the sqlite database " % getSafeExString(ex, UNICODE_ENCODING)
|
||||
errMsg += "located at '%s'" % self.parent.dbpath
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.11.18"
|
||||
VERSION = "1.10.11.19"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue