Below I include the program that generated more of
The obfu generator creates obfus in an infinite loop,
and logs them to the file a.
I have then selected an obfu from them that looks
nice, and did some postprocessing on it.
This is how I've got the above obfu.
The code is not really maintainable, as
it was supposed to be run only once.
Also, this is not the original code,
I did some fine-tuning and a bugfix since when I've posted
the original thread.
Anyway, here are some spoilers about how it works.
BEWARE! SPOILERS FOLLOW!
The magic is in the back subroutine.
It applies the inverse of a tr transformation to the message.
Most of the times, this fails because some character in the
message can not be generated.
The code looks like this because this subroutine
was a one-liner at once, then I found it's difficult
to create a japh even with it.
This is why I've written the rest of the code,
which throws together keywords
at randon, calls back on them,
and logs the result on success.
There are three constraints on the keywords though.
The first is of course getprotobyname.
The second is that there have to be three keywords with
a letter f in each, the last one being for (why?).
The third one is to always include join
(the only keyword with j).
I've added this third constraint so that the j
in the long string would often be encoded (it's not
in the above example, but it is in the original obfu).
Fiendishly clever. I've modified it to give the canonical JAPH. It's a little bit of a giveaway; maybe it could be masked better.
getprotobyname y format s quotemeta
getprotobyname waitpid rand (fileno), join values our
getprotobyname readline time q map or for
getprotobyname print for JpgbeiatbhmnePmnrehickmns x