Here's my first attempt at an obfu. Lots of fun! I don't think it'll run with strict, though.. Not all 100% original ideas.. I borrowed the smart ++ operator idea, but I haven't seen anyone else exploit the fact that references can be used to make strings...

#!/usr/bin/perl s>>b>xi&&(${'_' }x=4);$g.=${\$_ };$_=ord$_;{($_ -=1);}s@.+(.)$@ $1x2@ex;s%^.*(. )\1%${1}10$1%x; $g++for(1..$_); y!$_!x!+print$g ;s%.*?%%gx+$_++ ;$_=++$_.'3'.-- $_.++$_;s?^\s*( .+)(.)$?$2$1?gx ;$y=$_+0;$_=\%_ ;s*(\w+).+*\L$1 *x;chomp&&($s.= $_);$s++for(1.. ++$y);print"$s"

deobfus welcome.

blokhead

Replies are listed 'Best First'.
Re: First attempt obfu
by Anonymous Monk on Jan 11, 2002 at 18:53 UTC
    <HTML><BODY>
    #!/usr/bin/perl
    s>>b>xi&&(${'_'}x=4);   # substitute empty space with b and made 'b' (4 times)
    $g.=${\$_};             # saved in $g $_ = 'bbbb' by the reference to itself
    $_=ord$_;               # $_= 98 (numeric value of first b) returned by ord function
    {($_ -=1);}             # now 97
    s@.+(.)$@$1x2@ex;       # got 77 by substitution (@ separator) original with $1(first char) X 2
    s%^.*(.)\1%${1}10$1%x;  # got 7107 by substitution  with % separator
    $g++for(1..$_);         # got 'block' by 7101 iterations of 'bbbb' with ++ operator
    y!$_!x!+print$g;        # this is real obfusc - variables are interpolated within 'eval' only - no transliteration + print first part 'block'
    s%.*?%%gx+$_++;         # cleared $_ by substitution all digits by undef (% separator) and get 1 as $_++
    $_=++$_.'3'.--$_.++$_;  # concatenation of different '1' modifications and '3' to get 2312
    s?^\s*(.+)(.)$?$2$1?gx; # substitution  with ? separator to get 2231
    $y=$_+0;                # save in $y current $_ = 2231 for later use
    $_=\%_;                 # got hash reference $_ = HASH(0x1b93064)
    s*(\w+).+*\L$1
    *x;                     # got $_ = 'hash\n' by substitution previous by the first word translated to lovercase and add "\n" at the end of $_ for future obfusc 'chomp'
    chomp&&($s.=$_);        # chomped obfusc '\n' and populater $s by 'hash'
    $s++for(1..++$y);       #convert 'hash' to 'head' by 2232 iterations
    print"$s";              # print 'head'
    
    </BODY></HTML>