Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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=" $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);$$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.

In reply to Re: Yet another structured obfuscation by cecil36
in thread Yet another structured obfuscation by gmax

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others scrutinizing the Monastery: (2)
    As of 2019-09-21 09:09 GMT
    Find Nodes?
      Voting Booth?
      The room is dark, and your next move is ...

      Results (271 votes). Check out past polls.