Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Obfuscation or printing words like \160\162\151\156\164

by jbrugger (Parson)
on Apr 06, 2005 at 05:10 UTC ( [id://445181]=note: print w/replies, xml ) Need Help??


in reply to Re: Obfuscation or printing words like \160\162\151\156\164
in thread Obfuscation or printing words like \160\162\151\156\164

Oké. Thanks that worked. Perhaps a stupid question, but where could i have found this in documentation?
I've used supersearch, google, but i came across nothing.
perhaps a bad search query...

*** UPDATE *** Well, i made a little script to make it more easy to translate your text to create obfuscated code... Feel free to enhance and critisize, but thanks to you all for the help:
#!/usr/bin/perl -w use strict; my $chars = {}; for (my $i=33; $i<=127; $i++) { my $oct = sprintf("\\%o", $i); $chars->{chr($i)} = $oct; } foreach my $word (@ARGV) { my(@str) = split(//,$word); foreach my $letter (@str) { print $chars->{$letter}; } print " "; } # ./obus.pl just another Perl hacker, # returns # \152\165\163\164 \141\156\157\164\150\145\162 \120\145\162\154 \150\ +141\143\153\145\162\54

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Replies are listed 'Best First'.
Re^3: Obfuscation or printing words like \160\162\151\156\164
by ikegami (Patriarch) on Apr 06, 2005 at 05:16 UTC

    String literals are documented in the section "Quote and Quote-like Operators" of perlop.

    printf format strings are documented under sprintf in perlfunc, as indicated under printf in perlfunc.

Re^3: Obfuscation or printing words like \160\162\151\156\164
by hubb0r (Pilgrim) on Apr 06, 2005 at 06:39 UTC
    As stated by the previous poster, the \102 \103 etc are octal codes. These can be looked up in an ascii table such as: this one.

    Also as stated, since it is octal, it is a base 8 system, meaning the numbering goes:

    000 001 002 003 004 005 006 007
    010 011 012 013 014 015 016 017
    020 021 022 023 024 025 026 027
    etc
    etc
Re^3: Obfuscation or printing words like \160\162\151\156\164
by jhourcle (Prior) on Apr 06, 2005 at 11:32 UTC
    where could i have found this in documentation?

    Any ASCII table. And as for them not seeming to be in any order, I think it's actually quite orderly, so long as you stay in octal:

    • Uppercase : 0100 + letter position
    • Lowercase : 0140 + letter position
    • Digits : 060 + number

Log In?
Username:
Password:

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

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

    No recent polls found