mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
code refactoring (added UNKNOWN_DBMS_VERSION instead of "Unknown")
This commit is contained in:
parent
b4450c6ddd
commit
a19cb2c13a
6 changed files with 13 additions and 6 deletions
|
|
@ -19,6 +19,7 @@ from lib.core.data import logger
|
|||
from lib.core.enums import DBMS
|
||||
from lib.core.session import setDbms
|
||||
from lib.core.settings import MSSQL_ALIASES
|
||||
from lib.core.settings import UNKNOWN_DBMS_VERSION
|
||||
from lib.request import inject
|
||||
from lib.request.connect import Connect as Request
|
||||
|
||||
|
|
@ -132,7 +133,7 @@ class Fingerprint(GenericFingerprint):
|
|||
|
||||
break
|
||||
|
||||
if not kb.dbmsVersion or kb.dbmsVersion == ["Unknown"]:
|
||||
if not kb.dbmsVersion or kb.dbmsVersion == [UNKNOWN_DBMS_VERSION]:
|
||||
for version, check in [\
|
||||
("2000", "HOST_NAME()=HOST_NAME()"),\
|
||||
("2005", "XACT_STATE()=XACT_STATE()"),\
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ from lib.core.enums import DBMS
|
|||
from lib.core.enums import PLACE
|
||||
from lib.core.session import setDbms
|
||||
from lib.core.settings import MYSQL_ALIASES
|
||||
from lib.core.settings import UNKNOWN_DBMS_VERSION
|
||||
from lib.request import inject
|
||||
from lib.request.connect import Connect as Request
|
||||
|
||||
|
|
@ -144,7 +145,7 @@ class Fingerprint(GenericFingerprint):
|
|||
|
||||
if ((kb.dbms is not None and kb.dbms.lower() in MYSQL_ALIASES) \
|
||||
or conf.dbms in MYSQL_ALIASES) and kb.dbmsVersion and \
|
||||
kb.dbmsVersion[0] != "Unknown":
|
||||
kb.dbmsVersion[0] != UNKNOWN_DBMS_VERSION:
|
||||
kb.dbmsVersion[0] = kb.dbmsVersion[0].replace(">", "")
|
||||
kb.dbmsVersion[0] = kb.dbmsVersion[0].replace("=", "")
|
||||
kb.dbmsVersion[0] = kb.dbmsVersion[0].replace(" ", "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue