Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Your Basic JAPH

by webratta (Sexton)
on Dec 18, 2002 at 19:37 UTC ( [id://220932]=obfuscated: print w/replies, xml ) Need Help??

Here's a basic JAPH that outputs a file. Of course, you need write permissions in the directory you run this in, and a .gif viewer would be nice too. Now that my first bit of basic JAPH obfuscation is out of the way, I can get on to more complex stuff :P
#!/usr/bin/perl use strict;my $a=qq!71O73O70O56O57O97O200O0O20O0O128O0O0O255O255O255O 0O0O0O33O249O4O0O0O0O0O0O44O0O0O0O0O200O0O20O0O0O2O255O132O143O169O20 3O237O15O163O156O180O218O139O179O222O188O251O15O134O226O72O150O230O13 7O166O234O202O182O238O11O87O193O28O160O51O120O135O52O141O229O14O207O1 63O248O70O181O158O80O83O68O36O113O74O35O36O185O156O68O117O153O233O15O 169O176O114O150O218O103O4O122O233O118O160O69O223O142O60O108O212O200O1 28O225O249O176O107O186O227O237O91O58O219O172O7O129O81O49O252O111O64O2 3O40O88O134O150O195O39O193O5O216O7O248O213O166O84O22O152O0O54O25O249O 152O87O39O169O70O199O56O168O249O249O35O152O215O105O121O217O120O232O12 0O10O119O231O167O250O89O250O138O167O121O102O150O152O69O219O56O153O106 O250O102O170O203O133O11O170O150O75O9O137O249O208O203O43O92O236O218O21 3O42O236O171O187O240O76O169O24O189O106O61O189O107O141O138O9O171O29O59 O43O125O89O252O205O124O53O30O46O139O188O56O42O93O218O121O205O16O100O1 24O40O154O25O186O102O183O95O72O239O57O168O175O159O61O127O211O8O246O74 O166O231O14O164O128O0O215O52O44O180O234O161O196O24O20O43O90O188O136O4 9O163O198O141O16O28O59O122O252O8O50O164O200O145O36O75O154O60O137O177O 0O0O59O!;$a=~s/\s+//g;open JAPH,">japh.gif";binmode JAPH;for(split/O/ ,$a){print JAPH chr($_);}close JAPH;print "Just Another Perl Hacker";

Replies are listed 'Best First'.
Re: Your Basic JAPH
by elbie (Curate) on Dec 21, 2002 at 16:29 UTC

    It's pretty neat, but it raises an interesting question:

    Is writing an unmodified binary sequence directly out to a file really obfuscation? Certainly, I am not able to immediately interpret the effects of your actions, but I always felt there should be a level of misdirection in an obfuscated program to throw the reader off balance.

    Oh, and oddly enough, you actually don't need to declare $a with my even though you're using strict. $a and $b specifically are special variables that come predeclared. They're used in the sort function.

    Congrats on your first japh!

    elbieelbieelbie

Re: Your Basic JAPH
by Anonymous Monk on Dec 20, 2002 at 15:51 UTC
    Excellent!

Log In?
Username:
Password:

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

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

    No recent polls found