mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-28 04:43:46 +03:00
minor improvement for that MySQL identification naming
This commit is contained in:
parent
1119a85f39
commit
1a98095a93
|
@ -749,6 +749,9 @@ class Enumeration:
|
||||||
else:
|
else:
|
||||||
return tables
|
return tables
|
||||||
|
|
||||||
|
if Backend.getIdentifiedDbms() == DBMS.MYSQL:
|
||||||
|
conf.db = self.__safeMySQLIdentificatorNaming(conf.db)
|
||||||
|
|
||||||
if bruteForce:
|
if bruteForce:
|
||||||
resumeAvailable = False
|
resumeAvailable = False
|
||||||
|
|
||||||
|
@ -1006,8 +1009,10 @@ class Enumeration:
|
||||||
|
|
||||||
for columnData in value:
|
for columnData in value:
|
||||||
name = columnData[0]
|
name = columnData[0]
|
||||||
|
|
||||||
if Backend.getIdentifiedDbms() == DBMS.MYSQL:
|
if Backend.getIdentifiedDbms() == DBMS.MYSQL:
|
||||||
name = self.__safeMySQLIdentificatorNaming(name)
|
name = self.__safeMySQLIdentificatorNaming(name)
|
||||||
|
|
||||||
if len(columnData) == 1:
|
if len(columnData) == 1:
|
||||||
columns[name] = ""
|
columns[name] = ""
|
||||||
else:
|
else:
|
||||||
|
@ -1213,7 +1218,7 @@ class Enumeration:
|
||||||
Returns an safe representation of identificator name for MySQL
|
Returns an safe representation of identificator name for MySQL
|
||||||
"""
|
"""
|
||||||
retVal = value
|
retVal = value
|
||||||
if isinstance(value, basestring) and any(filter(lambda x: x in value, ['-', ' '])) and '`' not in value:
|
if isinstance(value, basestring) and not re.match(r"\A[A-Za-z0-9]+\Z", value):
|
||||||
retVal = "`%s`" % value
|
retVal = "`%s`" % value
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user