Sometimes writing small snippets of code can be meditative.
The other day, I realized that, even though I happen to be, among other things, Just Another Perl Hacker, I never bothered to write my own JAPH signature. So I went ahead and wrote up a very simple (but effective) one. Once it was complete, it dawned on me that other perl hackers may appreciate the ability to generate a signature like my own.
Since perl is all about code reuse and sharing, I figured I would write up a JAPH signature generator so that anyone can have an awesomely obfuscated JAPH signature like I do.
Firstly here’s my JAPH signature:
1 2 | $_='Kvtu!Bopuifs!Qfsm!Ibdlfs-!K/!Cpccz!Mpqf{'; @_=split//;foreach(@_){print chr(ord()-1)} |
You can run the JAPH signature by copy/pasting it to a text file (e.g., japh_sig.pl), and running with
1 | perl japh_sig.pl |
Which returns:
Just Another Perl Hacker, J. Bobby Lopez
You can also run the JAPH signature straight off the command line (with ‘perl -e’), but you have to replace the single quote characters in the string with double-quote characters, for example:
1 | perl -e '$_="Kvtu!Bopuifs!Qfsm!Ibdlfs-!K/!Cpccz!Mpqf{";@_=split//;foreach(@_){print chr(ord()-1)}' |
This is all just for fun of course, but if you do end up using my JAPH signature generator, please let me know by sending me a quick message on Twitter to @jbobbylopez.
Have Fun!
The JAPH Signature Generator
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #!/usr/bin/env perl ############################################## # USAGE: # perl japh.pl This is my awesome signature # # OUTPUT: # Your JAPH Signature: # $_='Uijt!jt!nz!bxftpnf!tjhobuvsf'; # @_=split//;foreach(@_){print chr(ord()-1)} # # Returns: # This is my awesome signature # # AUTHOR: J. Bobby Lopez <jbl@jbldata.com> ############################################## use feature say; my $offset = 1; my $signature = join (" ", @ARGV); my $obfus_sig; my @obfus = (); my @sig = split //, $signature; foreach my $c (@sig) { push @obfus, ( chr ( ord($c) + $offset ) ); } $obfus_sig = join ("", @obfus); say <<"OUT"; Your JAPH Signature: \t\$_='$obfus_sig'; \t\@_=split//;foreach(\@_){print chr(ord()-$offset)} OUT print "Returns:\n\t"; @_=split//,$obfus_sig;foreach(@_){print chr(ord()-$offset)}; say; 1; |