#!/usr/bin/perl # #This is my third Obfuscated code attempt! #I think Im getting better. You can run the same #OC under FreeBSD, Linux and Windows only. #Note: Comments are welcome! @h=split(//,$^O);if($^Oeq"MSWin32"){windows() ;}if($^Oeq"freebsd"){ freebsd(); } if($^O eq# "linux"){linx();}sub windows(){for(@h){push## (@o,ord());}push(@c, $o[0]-5,$o[1]+34,$o[2]-# 4,$o[3]+6,$o[4]-8,$o[5]+65);for(@c){print chr ();}}sub freebsd(){for(@h){push(@o,ord());}## push(@c,$o[0]-30,$o[1]+3,$o[2]-18,$o[3]+10,## $o[4]+4,$o[5]+1);for(@c){print chr();}print## "\n";}sub linx(){for(@h){push(@o,ord());}push (@c,$o[0]-36,$o[1]+12,$o[2]-27,$o[3]-6,$o[4]- 18,$o[5]=116);for(@c){print chr();}print"\n"# ;}#!$!s$%r)(%@%@%{{@^!%@%%@{{~@!$!!$%r)(%@%@#

Replies are listed 'Best First'.
Re: Third Obfuscated Code...
by diotalevi (Canon) on Oct 16, 2002 at 00:28 UTC

    De-obfuscated.

    windows() if $^O eq 'MSWin32'; freebsd() if $^O eq 'freebsd'; linux() if $^O eq 'linux'; sub windows { split //, 'HuSoft'; # map chr(), (0x4D - 0x05, # 0x53 + 0x22, # 0x57 - 0x04, # 0x69 + 0x06, # 0x6E - 0x08, # 0x33 + 0x41); } sub freebsd { (split( //, 'HuSoft'), "\n"); # (map chr(), (0x66 - 0x1E, # 0x72 + 0x03, # 0x65 - 0x12, # 0x65 + 0x0F, # 0x62 + 0x04, # 0x73 + 0x01), # "\n") } sub linux { (split( //, 'HuSoft'), "\n"); # (map chr(), (0x6c - 0x24, # 0x69 + 0x0c, # 0x6e - 0x1b, # 0x75 - 0x06, # 0x78 - 0x12, # 0x74), # "\n") }
    __SIG__ printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B:: +svref_2object(sub{})->OUTSIDE