mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-09-20 11:02:27 +03:00
Improve Apache Doris and StarRocks detection logic
- Use VERSION() = '5.7.99' as primary Doris fingerprint (more reliable than BITMAP functions) - Add @@VERSION_COMMENT checks for both Doris and StarRocks - Add StarRocks fork detection to avoid misidentification - Remove unreliable BITMAP_UNION_COUNT() as sole detection method This addresses the issue where BITMAP_UNION_COUNT() alone could misidentify StarRocks or other bitmap-compatible systems as Doris. The new multi-step detection logic provides more accurate database identification.
This commit is contained in:
parent
68ebb7d0aa
commit
e342e7f37d
|
@ -109,6 +109,7 @@ class FORK(object):
|
||||||
OPENGAUSS = "OpenGauss"
|
OPENGAUSS = "OpenGauss"
|
||||||
DM8 = "DM8"
|
DM8 = "DM8"
|
||||||
DORIS = "Doris"
|
DORIS = "Doris"
|
||||||
|
STARROCKS = "StarRocks"
|
||||||
|
|
||||||
class CUSTOM_LOGGING(object):
|
class CUSTOM_LOGGING(object):
|
||||||
PAYLOAD = 9
|
PAYLOAD = 9
|
||||||
|
|
|
@ -295,7 +295,7 @@ VIRTUOSO_SYSTEM_DBS = ("",)
|
||||||
|
|
||||||
# Note: (<regular>) + (<forks>)
|
# Note: (<regular>) + (<forks>)
|
||||||
MSSQL_ALIASES = ("microsoft sql server", "mssqlserver", "mssql", "ms")
|
MSSQL_ALIASES = ("microsoft sql server", "mssqlserver", "mssql", "ms")
|
||||||
MYSQL_ALIASES = ("mysql", "my") + ("mariadb", "maria", "memsql", "tidb", "percona", "drizzle", "doris")
|
MYSQL_ALIASES = ("mysql", "my") + ("mariadb", "maria", "memsql", "tidb", "percona", "drizzle", "doris", "starrocks")
|
||||||
PGSQL_ALIASES = ("postgresql", "postgres", "pgsql", "psql", "pg") + ("cockroach", "cockroachdb", "amazon redshift", "redshift", "greenplum", "yellowbrick", "enterprisedb", "yugabyte", "yugabytedb", "opengauss")
|
PGSQL_ALIASES = ("postgresql", "postgres", "pgsql", "psql", "pg") + ("cockroach", "cockroachdb", "amazon redshift", "redshift", "greenplum", "yellowbrick", "enterprisedb", "yugabyte", "yugabytedb", "opengauss")
|
||||||
ORACLE_ALIASES = ("oracle", "orcl", "ora", "or")
|
ORACLE_ALIASES = ("oracle", "orcl", "ora", "or")
|
||||||
SQLITE_ALIASES = ("sqlite", "sqlite3")
|
SQLITE_ALIASES = ("sqlite", "sqlite3")
|
||||||
|
|
|
@ -105,8 +105,12 @@ class Fingerprint(GenericFingerprint):
|
||||||
fork = FORK.PERCONA
|
fork = FORK.PERCONA
|
||||||
elif inject.checkBooleanExpression("AURORA_VERSION() LIKE '%'"): # Reference: https://aws.amazon.com/premiumsupport/knowledge-center/aurora-version-number/
|
elif inject.checkBooleanExpression("AURORA_VERSION() LIKE '%'"): # Reference: https://aws.amazon.com/premiumsupport/knowledge-center/aurora-version-number/
|
||||||
fork = FORK.AURORA
|
fork = FORK.AURORA
|
||||||
elif inject.checkBooleanExpression("BITMAP_UNION_COUNT(NULL) IS NULL"): # Reference: Apache Doris specific BITMAP functions
|
elif inject.checkBooleanExpression("VERSION() LIKE '5.7.99'"): # Reference: Apache Doris returns fixed version 5.7.99 for MySQL compatibility
|
||||||
fork = FORK.DORIS
|
fork = FORK.DORIS
|
||||||
|
elif inject.checkBooleanExpression("@@VERSION_COMMENT LIKE '%Doris%'"): # Reference: Apache Doris version comment contains 'Doris'
|
||||||
|
fork = FORK.DORIS
|
||||||
|
elif inject.checkBooleanExpression("@@VERSION_COMMENT LIKE '%StarRocks%'"): # Reference: StarRocks version comment contains 'StarRocks'
|
||||||
|
fork = FORK.STARROCKS
|
||||||
else:
|
else:
|
||||||
fork = ""
|
fork = ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user