Changes for page Engine_XalanJ

Last modified by Nicolas Gregoire on 2012/01/31 17:35

From version Icon 64.1 Icon
edited by Nicolas Gregoire
on 2012/01/12 22:35
Change comment: There is no comment for this version
To version Icon 66.1 Icon
edited by Nicolas Gregoire
on 2012/01/12 23:03
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -63,10 +63,19 @@
63 63  
64 64  === Reading stdout ===
65 65  
66 -As the output have an unknown number of lines, we must use a loop construct like "while" ... which is not available in XSLT. This limitation is due to the functional programming paradigm but can be circumvented using templates and recursion. This way, we can also __update__ some variables (yeah !), but the syntax is awful and error prone. It's far better to directly write loops using non standard constructs and then convert them in templates + recursion using a dedicated tool like the [[XSLT Loop Compiler>>http://www2.informatik.hu-berlin.de/~~obecker/XSLT/loop-compiler/||rel="__blank"]].
66 +As the output have an unknown number of lines, we must use a loop construct like "while" ... which is not available in XSLT. This limitation is due to the functional programming paradigm but can be circumvented using templates and recursion. This way, we can also __update__ some variables (using <loop:update>), but the syntax is awful and error prone.
67 67  
68 +It's far more efficient to 1) write loops using non-standard elements like <loop:while> 2) convert them in stylesheets using only templates and recursion. This conversion can be done with a tool like the [[XSLT Loop Compiler>>http://www2.informatik.hu-berlin.de/~~obecker/XSLT/loop-compiler/||rel="__blank"]] (which is itself in XSLT).
68 68  
70 +|=Using non standards elements|=Using recursion and templates|=Commands to execute|=Output
71 +|[[xalanj-reading-stdout.lxsl>>attach:xalanj-reading-stdout.lxsl]]||[[xalanj-reading-stdout.xsl>>attach:xalanj-reading-stdout.xsl]]||[[unix_commands.xml>>attach:unix_commands.xml]]||[[xalanj-reading-stdout.txt>>attach:xalanj-reading-stdout.txt]]
69 69  
73 +xx
74 +
75 +=== A pure Java reverse-shell ===
76 +
77 +It is afaik not possible to get a pure Java reverse-shell, as we can't create threads :-(
78 +
70 70  == File creation ==
71 71  
72 72  The "write" extension element allows to create files on the engine side. The content written to the file must be valid UTF-8 (so plain ASCII works too). Existing files can be overwritten.