1. 19
  1.  

  2. 4

    I fondly the remember the times when your python2 script could start with # encoding: rot-13 and your source code be completely rot13 encoded. More on my blog at https://frederik-braun.com/rot13-encoding-in-python.html

    1. 3

      Python is really a shit language for obfuscating things. In the Perl community, obfuscated scripts that print “Just another Perl hacker” have been a tradition for decades, and the richness of the language really pays off when you’re trying to be a jerk.

      Fresh from 2009 or so, here’s my best take on the genre – this produces a rendering of my email sig at the time. I’m particularly proud of the base 26 conversion :)

      $q=q((pete gamache));$_=fpeoiaglclivdlcgglvqhcbwclemhcbwflclvqivcrgqhcbwafak
      ;sub A{for(($a=1)..pop){$a*=$a*=$a+$a*$a;$a%=999999}$a%128}sub b{@A=a..pop}$
      qq.=chr A(uc b($1))while s/(..)//;$qq="($qq)";&z;print"$q $qq 14 /Courier ";
      sub c{$x=$_[0];$x-=6.28until$x<6.28;my$a;for(0..10){$a+=($x**(2*$_)*(-1)**$_
      )/_(2*$_)}$a*2**(-$_[0]/8)}sub _{$_[0]<1?1:$_[0]*_($_[0]-1)}print join (' ',
      '66 666 translate 510 0 moveto 0 dup dup lineto 50 moveto',map{$_,c($_/8)*50
      ,'lineto'}(0..444)),' stroke findfont exch scalefont setfont 222 -30 moveto'
      ,' show 222 20 moveto show showpage';sub z{$q=~s/(g.+E)/$1, $1\@gmail.com/i}
      
      1. 3

        This has been my .signature for ages:

        #!/usr/bin/perl                             https://domm.plix.at
        for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
        
        1. 3
        2. 2

          My favourite. Much smaller, in C, but IMHO more confusing instead of obsfucating:

          #include <unistd.h>
          
          int main() {
            uint32_t b = 0x0a646c72;
            uint64_t a = 0x6f77206f6c6c6548;
          
            return !write(1, &a, 12);
          }
          
          1. 2

            If you dive into the C++ hello world, follow every header, every overload and trace every iostream class that is instantiated, it feels like you are sitting on a giant complex structure that was obfuscated by the deceptively simple looking abstraction which causes hello world to be flushed to stdout.

            1. 2

              This has had a python 3 update since it was last posted.

              Stories with similar links:

              1. Obfuscating "Hello world!" via av 5 years ago | 2 points | 1 comment
              2. Obfuscating "Hello world!" via pushcx 6 years ago | 13 points | no comments