Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Yet another structured obfuscation

by cecil36 (Pilgrim)
on Apr 09, 2002 at 16:03 UTC ( #157756=note: print w/ replies, xml ) Need Help??


in reply to Yet another structured obfuscation

This is a perfect example on how to hack Perl code. I might as well use it and try to obfuscate some of my stuff that I found/wrote. This might be fun to try on a UPS package tracking program I got from SourceForge.

Update 4/10: Below is is my code after going through partial obfuscation.

1210252b583e6b1575987127198a2917408d2260547f005251301e85 1d1a506c0849463b436839531b5973556e160591369a248c28848874323179818b3786 +040f262d5c933a3c34384a96907a764235898721772e3d5e2c4c95781c568265065a4 +f1197456a6f648e145b0d614d9923920e834b6d944e62803f445d7d0c010a2a414818 +201f72338f097c0b4757027e077b5f03637069132f6667 $LYNX="/usr/bin/l $WORKDIR="/home/A if (!(-e"$WORKDIR/$ if(!(-e"$WORKDIR/$O open(FILE,"$WORKDIR print "Enter the nu $new =~ s/^\s+//; "/pagemsg/PAGEMSG." $!\n";print FILE "M $OUTPUTOUT!\n"; unl (!($old eq $new)){o (FILE,">$WORKDIR/$L ="last.activity"; FILE "$new";close ( FILE "No Previous E email $MAILOUT.= $C send the status inf || die "Can't open !(-e"$WORKDIR")){mkd!\n";$foundit = 0; w"$F6 $F7 $F8 $F9 $F1 "; print FILE "\n";c#!/usr/bin/perl $Cou$F10,$F11)=split(' ' $F5,$F6,$F7,$F8,$F9,$LOGFILE")){open(FIL$OUTPUTIN="output.tm $PagerCmd";}} open ($TRACK\\\&type1=1"; $URL="http://wwwapps $_;($F1,$F2,$F3,$F4,$new =~ s/\s+$//;($F'>',$CounterFile); p (LIST,"$WORKDIR/$OUT(example Arch)\n"; $) {s/^\s*$//g;print ); print "Enter the +$//; $packagestat, ">$WORKDIR/$OUTPUT ,$tmpnew,9999);$new=.ups.com/tracking/tr/$LASTACTIVITY") || /$MAILOUT") || die "0 $F11"; last;}if (/4)=split(' ',$packag ;;chomp ($Counter);} ;close (FILE); unlin ;close(OUT); open(IN;unlink("logfile.txt;}chdir("$WORKDIR"); >$WORKDIR/$LOGFILE")ASTACTIVITY"); printBIN $PAGER";system " Can't open file $LASCould not open file:E");close (FILE);} o E,">$WORKDIR/$LOGFILENTS: Package ID $TER)){ $PagerCmd = "e FILE); open (FILE,">FILE, "$WORKDIR/$OUTFILE,">$WORKDIR/$LAS HEFILE>){$Counter=$_IN>;chomp($TRACK);LASTACTIVITY")){open LE,">$WORKDIR/$OUTPULE>;close(FILE); opeN") || die "Can't de OUT"); for (<INFILE>OUTPUT $_;} close(OUOUTPUTIN"); print OU PUTIN"); open(OUTPUTPUTOUT") || die "CouR/$OUTPUTOUT") || di RACK $status $new\n"RACK is/was $status SG:\n"; print FILE " STDIN>;chomp ($pagerT `lynx --dump $URL`TACTIVITY!\n"; print TACTIVITY") || die "TE=(localtime); if (TO: $pager $service TOUT");close (FILE);TPUT);close(INFILE);TPUTOUT") || die "Co UTPUTOUT")){open (FI\n"; $foundit = 0; w\n"; unlink("$WORKDI \n";print FILE "CONTacking.cgi?inquiry1=activity/i) {$foundi cho \"Check UPS Tracckagestatus=$_;last;close(THEFILE);$Coun die "Could not open dit == 1){$tmpnew = dministrator/perl"; e "Can't delete fileed by the recipient estatus =~ s/\s+$//; estatus, 9999);$statf($foundit == 1){$pafile $LOGFILE!\n";; file.txt";$MAILOUT =file: $!\n";$old=<FIg number for the pac hile(<LIST>){chomp($hile(<LIST>){chomp($ink("last.activity") ir("$WORKDIR", 0775)k("$WORKDIR/$OUTPUTIkage: "; $TRACK=<STD king$TRACK\" | $MAILld not open file: $!ld1,$Fld2,$Fld3,$Fld lete file $OUTPUTIN!line = $_);if ($founline = $_);if (/Stat lose (FILE);if(($PAGmber of the pager tomessaging service us n(LIST,"$WORKDIR/$OUnfor great justice, nter the UPS trackin nterFile='counter.txnter\n$Counter"; clontry";close (FILE);} o to.\n"; $pager = <omp ($service); openounter;$LASTACTIVITY output.txt"; $DAp.txt"; $OUTPUTOUT="pen (FILE,">$WORKDIR pen(OUT,">$WORKDIR/$print FILE "$DATE $TrintOUTFILE "pagecou se are belong to us\se(OUTFILE);print "Eservice = <STDIN>;ch t = 1;}}close(LIST);t'; open(THEFILE,$Cotake off every 'ZIG' ter++; open(OUTFILE,to $new\nall your bauld not open file: $ unterFile); while(<Tus/){$foundit = 1;}ius="$Fld3 $Fld4"; if us=~s/^\s+//;$packagynx";$LOGFILE = "log} if (!(-e"$WORKDIR/ }} close(LIST);$old=~s/^\s+//;$old=~s/\s
Looks like it's a little too obvious, especially with the "all your base" scattered throughout the code.


Comment on Re: Yet another structured obfuscation
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://157756]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2015-07-30 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls