mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Minor update
This commit is contained in:
parent
177fc0376d
commit
dc2ee8bfa0
|
@ -71,9 +71,9 @@ def setHandler():
|
||||||
items.remove(_)
|
items.remove(_)
|
||||||
items.insert(0, _)
|
items.insert(0, _)
|
||||||
|
|
||||||
for name, aliases, Handler, Connector in items:
|
for dbms, aliases, Handler, Connector in items:
|
||||||
if conf.dbms and conf.dbms not in aliases:
|
if conf.dbms and conf.dbms.lower() != dbms.lower():
|
||||||
debugMsg = "skipping test for %s" % name
|
debugMsg = "skipping test for %s" % dbms
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ def setHandler():
|
||||||
logger.debug("forcing timeout to 10 seconds")
|
logger.debug("forcing timeout to 10 seconds")
|
||||||
conf.timeout = 10
|
conf.timeout = 10
|
||||||
|
|
||||||
dialect = DBMS_DICT[name][3]
|
dialect = DBMS_DICT[dbms][3]
|
||||||
|
|
||||||
if dialect:
|
if dialect:
|
||||||
sqlalchemy = SQLAlchemy(dialect=dialect)
|
sqlalchemy = SQLAlchemy(dialect=dialect)
|
||||||
|
|
|
@ -146,7 +146,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def checkDbms(self):
|
def checkDbms(self):
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(ACCESS_ALIASES) or conf.dbms in ACCESS_ALIASES):
|
if not conf.extensiveFp and (Backend.isDbmsWithin(ACCESS_ALIASES) or (conf.dbms or "").lower() in ACCESS_ALIASES):
|
||||||
setDbms(DBMS.ACCESS)
|
setDbms(DBMS.ACCESS)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def checkDbms(self):
|
def checkDbms(self):
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(DB2_ALIASES) or conf.dbms in DB2_ALIASES):
|
if not conf.extensiveFp and (Backend.isDbmsWithin(DB2_ALIASES) or (conf.dbms or "").lower() in DB2_ALIASES):
|
||||||
setDbms(DBMS.DB2)
|
setDbms(DBMS.DB2)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -104,7 +104,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
|
|
||||||
def checkDbms(self):
|
def checkDbms(self):
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(FIREBIRD_ALIASES) \
|
if not conf.extensiveFp and (Backend.isDbmsWithin(FIREBIRD_ALIASES) \
|
||||||
or conf.dbms in FIREBIRD_ALIASES) and Backend.getVersion() and \
|
or (conf.dbms or "").lower() in FIREBIRD_ALIASES) and Backend.getVersion() and \
|
||||||
Backend.getVersion() != UNKNOWN_DBMS_VERSION:
|
Backend.getVersion() != UNKNOWN_DBMS_VERSION:
|
||||||
v = Backend.getVersion().replace(">", "")
|
v = Backend.getVersion().replace(">", "")
|
||||||
v = v.replace("=", "")
|
v = v.replace("=", "")
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(HSQLDB_ALIASES) \
|
if not conf.extensiveFp and (Backend.isDbmsWithin(HSQLDB_ALIASES) \
|
||||||
or conf.dbms in HSQLDB_ALIASES) and Backend.getVersion() and \
|
or (conf.dbms or "").lower() in HSQLDB_ALIASES) and Backend.getVersion() and \
|
||||||
Backend.getVersion() != UNKNOWN_DBMS_VERSION:
|
Backend.getVersion() != UNKNOWN_DBMS_VERSION:
|
||||||
v = Backend.getVersion().replace(">", "")
|
v = Backend.getVersion().replace(">", "")
|
||||||
v = v.replace("=", "")
|
v = v.replace("=", "")
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def checkDbms(self):
|
def checkDbms(self):
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(MAXDB_ALIASES) or conf.dbms in MAXDB_ALIASES):
|
if not conf.extensiveFp and (Backend.isDbmsWithin(MAXDB_ALIASES) or (conf.dbms or "").lower() in MAXDB_ALIASES):
|
||||||
setDbms(DBMS.MAXDB)
|
setDbms(DBMS.MAXDB)
|
||||||
|
|
||||||
self.getBanner()
|
self.getBanner()
|
||||||
|
|
|
@ -66,7 +66,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
|
|
||||||
def checkDbms(self):
|
def checkDbms(self):
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(MSSQL_ALIASES) \
|
if not conf.extensiveFp and (Backend.isDbmsWithin(MSSQL_ALIASES) \
|
||||||
or conf.dbms in MSSQL_ALIASES) and Backend.getVersion() and \
|
or (conf.dbms or "").lower() in MSSQL_ALIASES) and Backend.getVersion() and \
|
||||||
Backend.getVersion().isdigit():
|
Backend.getVersion().isdigit():
|
||||||
setDbms("%s %s" % (DBMS.MSSQL, Backend.getVersion()))
|
setDbms("%s %s" % (DBMS.MSSQL, Backend.getVersion()))
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(MYSQL_ALIASES) \
|
if not conf.extensiveFp and (Backend.isDbmsWithin(MYSQL_ALIASES) \
|
||||||
or conf.dbms in MYSQL_ALIASES) and Backend.getVersion() and \
|
or (conf.dbms or "").lower() in MYSQL_ALIASES) and Backend.getVersion() and \
|
||||||
Backend.getVersion() != UNKNOWN_DBMS_VERSION:
|
Backend.getVersion() != UNKNOWN_DBMS_VERSION:
|
||||||
v = Backend.getVersion().replace(">", "")
|
v = Backend.getVersion().replace(">", "")
|
||||||
v = v.replace("=", "")
|
v = v.replace("=", "")
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def checkDbms(self):
|
def checkDbms(self):
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(ORACLE_ALIASES) or conf.dbms in ORACLE_ALIASES):
|
if not conf.extensiveFp and (Backend.isDbmsWithin(ORACLE_ALIASES) or (conf.dbms or "").lower() in ORACLE_ALIASES):
|
||||||
setDbms(DBMS.ORACLE)
|
setDbms(DBMS.ORACLE)
|
||||||
|
|
||||||
self.getBanner()
|
self.getBanner()
|
||||||
|
|
|
@ -63,7 +63,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
* http://www.postgresql.org/docs/9.1/interactive/release.html (up to 9.1.3)
|
* http://www.postgresql.org/docs/9.1/interactive/release.html (up to 9.1.3)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(PGSQL_ALIASES) or conf.dbms in PGSQL_ALIASES):
|
if not conf.extensiveFp and (Backend.isDbmsWithin(PGSQL_ALIASES) or (conf.dbms or "").lower() in PGSQL_ALIASES):
|
||||||
setDbms(DBMS.PGSQL)
|
setDbms(DBMS.PGSQL)
|
||||||
|
|
||||||
self.getBanner()
|
self.getBanner()
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
* http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions
|
* http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(SQLITE_ALIASES) or conf.dbms in SQLITE_ALIASES):
|
if not conf.extensiveFp and (Backend.isDbmsWithin(SQLITE_ALIASES) or (conf.dbms or "").lower() in SQLITE_ALIASES):
|
||||||
setDbms(DBMS.SQLITE)
|
setDbms(DBMS.SQLITE)
|
||||||
|
|
||||||
self.getBanner()
|
self.getBanner()
|
||||||
|
|
|
@ -59,7 +59,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
|
|
||||||
def checkDbms(self):
|
def checkDbms(self):
|
||||||
if not conf.extensiveFp and (Backend.isDbmsWithin(SYBASE_ALIASES) \
|
if not conf.extensiveFp and (Backend.isDbmsWithin(SYBASE_ALIASES) \
|
||||||
or conf.dbms in SYBASE_ALIASES) and Backend.getVersion() and \
|
or (conf.dbms or "").lower() in SYBASE_ALIASES) and Backend.getVersion() and \
|
||||||
Backend.getVersion().isdigit():
|
Backend.getVersion().isdigit():
|
||||||
setDbms("%s %s" % (DBMS.SYBASE, Backend.getVersion()))
|
setDbms("%s %s" % (DBMS.SYBASE, Backend.getVersion()))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user