In the article refered by Linux Journal article - possible advocacy potential the master of obfuscation warns us:
In addition, we are considering changing our data file format from an arcane system developed in-house to one using XML.
I'm scared! Erudil tackles XML! I am _so_ afraid of the result! Such a sick and twisted mind applied to such a sick and twisted format!
So I am certainly not an obfuscation expert, but I decided to strike pre-emptively and to write a sick and twisted XML obfuscation, using XML::Parser to sorta parse itself and to sorta print a JAPH.
#!/bin/perl -w use strict; seek DATA, $[,$[; sub another{ foreach( $[..(($^W<<1)+$^W)) { <DATA>}} my $just= another or my $xml=hacker() and <DATA>; sub hacker { $_= <DATA> } sub smoke { pipe 0, 1} sub mirror { return join( " \n", split( /[^a-x]+/, $xml))} sub ON { "perl -e'print q{". (smoke and mirror) . "}' |" } open( ELT, ON); <ELT>;use XML::Parser; $xml=~ s<!-- smoke --><!--mirror-->; my $parser= XML::Parser->new( Handlers => { Start => sub { while( <ELT>) { chomp; print ucfirst; last; } }, End => sub { print "\n" if( $_[0]->depth == 0); }, Comment => sub { <ELT>=~ m</ELT>;} }); $parser->parse( \*DATA); $just=q</ELT>. qq</ELT>; __DATA__ </DATA>
In reply to XML _is_ sick and twisted by mirod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |