XML基础与安全攻防

约 1 分钟读完

XML

XML程序

<?xml version="1.0" encoding="UTF-8"?>
<family>
    <father>father</father>
    <mother>mother</mother>
    <childern>
        <child1>child1</child1>
        <chile>child2</chile>
    </childern>
</family>

xml实体引用

实体名称 付号 解释
&lt; < 小于
&gt; > 大于
&amp; & 和号
&apos; '' 单引号
quot; "" 双引号

程序示例:

<?xml version="1.0" encoding="UTF-8"?>
<family>
    <father>father</father>
    <mother>mother</mother>
    <childern>
        <child1>child1 &lt; &gt; &apos; &quot; &amp; chile2</child1>
        <chile>child2</chile>
    </childern>
</family>

浏览器显示:

image-20250305121012031

注释:

ctrl+/

元素间空格一个空格显示,多个空格只显示一个

image-20250305121726351

属性

写在标签里面

← XPath注入攻击详解 Sqlmap进阶使用技巧 →