Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Beware the S !

by Sigmund (Pilgrim)
on Aug 31, 2001 at 15:30 UTC ( [id://109352]=obfuscated: print w/replies, xml ) Need Help??

My Signature...

perl -le 's ssSss.s sSsSiss.s s$sSss.s s.$s\107ss.print'


...and How it Works!

well, it's rather simple! first of all I work on the default variable, $_, without declaring it; then i operate some substitutions using the same "s" character as a delimiter; this contributes to mess up the whole thing!

perl -le 's ssSss.s sSsSiss.s s$sSss.s s.$s\107ss.print'

The red "s"'s are the delimiters. Let's replace them with standard ones:

perl -le 's //S/s.s /S/Si/s.s /$/S/s.s /.$/\107/s.print'


The blue "s"'s, by the way, are known modifiers (the /s modifier) which tell the interpreter to treat the search pattern as a single line (and it is, so they're perfectly useless!!!);
by the way, coding this one-liner i discovered that s sSafter a regexp one can specify as many modifiers as he wants, even if they are the same one! I could even have written every single regexp as:

s sSsSissss

Where the last two "s"'s are redundant but excellently contribute to confuse things!
More mess??? You'd have noticed now that even "/i" is a modifier and it does nothing against our purposes, so we could even put it in this way:

s sSisissis

Well, now it looks a little bit clearer!
But what does it do???
It starts substituting the null string with letter "S"; then goes on substituting the letter "S" with "Si" !!! Pretty stupid, ain't it?!? Now let's strike the code already explained.

perl -le 's //S/s.s /S/Si/s.s /$/S/s.s /.$/\107/s.print'

The code in green is pretty silly too, and basically serves the only purpose to confuse one's ideas: it substitutes the end of the string (represented by $ alone), that's a null character, with an "S", and this is clearly an attempt to divert attention towards that wood of "s"'s!

If we print out our $_ we discover that its value is "SiS"

And then, the ugly part of my hack: i thougth to write down "G" messing with "s"'s and unary operators, but I discovered that, while ++ is magic, -- isn't!!! and so the only way i found to write "G" (without actually writing it, of course!) was to use plain octal code, so not to use any other alphabetic character. The regexp substitutes the last character with a "G".
The overload of S,s,$ and so on creates a really "S-ish" signature.
One other factor of obfuscation is the possibility of using regexps that do nothing, like:

s sssssss


As a final joke, i'd like to point out that my ".sig" is "SiG" (that's the shortening of my nick), in perfect coherence!

Alternative Endings

I made many many tries to write my sig, and at last i couldn't nearly decide which one to use...then i went for the one which contains less useless code. Other ones were:

perl -le 's ssSssgi.s sSsSisgis.s sisi\x47sgsi.print'

perl -le 's ssSssi.s sSsSisis.s sisi\x47ssi.print'

perl -le 's ssSs.s sSsSis.s sisi\x47s.print'

perl -le 's ssSssgi.s sSsSisgis.s s$s\x47sgsi.print'

perl -le 's ssSssgi.s sSsSisgis.s s$sGsgsi.print'

perl -le 's ssSgssgi.s sgsisgis.s s$sGsgsi.print'

perl -le 's ssSss.s ssss.s sSsSisis.s sisi\x47ssi.print'

perl -le 's ssSss.s ssss.s sSsSisis.s sisi\107ssi.print'

perl -le 's ssSsss.s sssss.s sSsSisisss.s sisi\107ssiss.print'

perl -le 's ssSss.s sSsSiss.s s$sSss.s s.$s\107ss.print'

Feel free to tell me which one you prefer!

Enjoy!

SiG

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://109352]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-24 06:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found