Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

my fisrt japh with the unpack function

by Asmo (Monk)
on Sep 22, 2001 at 13:56 UTC ( #114038=obfuscated: print w/replies, xml ) Need Help??

print unpack(u,"92G5S=\"!!\;F]T\:&5R(\%!E<FP@\(\$AA8VME<@``");

I'm not very good with this function because it's very new for me,so i tried to use it with a JAPH, what do you think ?


Replies are listed 'Best First'.
Re: my fisrt japh with the unpack function
by blakem (Monsignor) on Sep 22, 2001 at 14:10 UTC
    nice... you can eliminate those backslashes by using the q operator. It allows you to choose your string delimiters, like so:
    print unpack(u,q/92G5S="!!;F]T:&5R(%!E<FP@($AA8VME<@``/);
    Or since this is obfu, pick an unusual char for a delimiter, perhaps 'u':
    print unpack(u,q u92G5S="!!;F]T:&5R(%!E<FP@($AA8VME<@``u);
    even better, how about ',':
    print unpack(u,q,92G5S="!!;F]T:&5R(%!E<FP@($AA8VME<@``,);
    This lets us obfu it further...
    print unpack u,(q,u,,q,92G5S="!!;F]T:&5R(%!E<FP@($AA8VME<@``,);
    figuring that one out is left as an excercise to the reader...

    Read more about it at perlop.


      Ok, thanks for this advice !

Re: my fisrt japh with the unpack function
by rob_au (Abbot) on Sep 22, 2001 at 14:19 UTC
    While I don't want to discourage your efforts in extending your knowledge of Perl and the functions therein, I must object to this being classified as "obfuscated code". The primary reason for this is that the code logic and execution is hardly obscured or hidden - It is a single unpack statement from which the results are print-ed, nothing more.

    For a bit of background reading on how to write really good obfuscated code, I would recommend having a look at the two obfuscation code reviews by japhy here and here. Also too have a look at the obfuscated code written by the mighty Erudil, including the camel code.


    Ooohhh, Rob no beer function well without!

      Ok, i will read those, but you know, for me, it is obfuscated as it seems unreadable ;-) btw, am i the only newbie here ?

        The fact that you are a newbie doesn't mean we will outcast you.

        What you should do is learn the language very thoroughly like japhy has, then learn how to manipulate it. Once you have done that, you too can write some pretty cool obfu's.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-05-20 03:23 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (72 votes). Check out past polls.