in reply to Re: DNA japh
in thread DNA japh
Did I first pick up that trick from you? I think perhaps I did. However, it is an exceedingly helpful trick to figure out why ...
... sometimes the 'transformation' doesn't work quite right due to some misunderstanding of how something gets parsed. More often than not, I find myself having *some* whitespace required, whether it is because I'm using an ne or an or or the x operator on something I'm converting to an int. Or something similar. It's always helpful to run the code in progress through some mechanism like this to ensure that it will compile (the extra trip through B::Deparse implements a -c style check). So step 1 is - did B::Deparse pick up all the code, and if so, step 2 is - does the code still resemble the original intended code?
While your spin on the sed regex works, my solution was a bit more 'brute force':
$ sed 's/eval.*/print/' obfu.pl | perl | perl -MO=Deparse
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: DNA japh
by liverpole (Monsignor) on Nov 20, 2006 at 16:39 UTC |