XEE漏洞的原理
ctfshow-xxe
web373
代码
<?php
error_reporting(0);
libxml_disable_entity_loader(false);
//file_get_contents("php://input"),我们需要post我们的payload
$xmlfile = file_get_contents('php://input');
if(isset($xmlfile)){
//DOMDocument,表示整个HTML或XML文档;作为文档树的根。
$dom = new DOMDocument();
//loadXML,从一个字符串中,加载一个XML文档
$dom->loadXML($xmlfile, LIBXML_NOENT | LIBXML_DTDLOAD);
//将XML文档作为一个导入一个XML对象
$creds = simplexml_import_dom($dom);
//XML对象指向ctfshow的元素标签
$ctfshow =