|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
http://hpaste.org/5637
I have no idea whether this is actually executable or whether it does
anything interesting, but somebody *clearly* has a lot of free time on
their hands....
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I have no idea whether this is actually executable or whether it does
> anything interesting, but somebody *clearly* has a lot of free time on
> their hands....
>
You haven't seen the International Obfuscated C Code Contest, have you?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible <voi### [at] devnull> wrote:
> http://hpaste.org/5637
> I have no idea whether this is actually executable or whether it does
> anything interesting, but somebody *clearly* has a lot of free time on
> their hands....
What language is that?
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> What language is that?
It parses as valid Haskell. I have no idea what in the name of God it
actually does...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nicolas Alvarez wrote:
> You haven't seen the International Obfuscated C Code Contest, have you?
Yeah, I have. IIRC, there was a program there in the shape of a
character from Tolkin Elvish, which, when run, prints out the Elvish
character set. Or. Something.
See also:
http://www.haskell.org/haskellwiki/Obfuscation
Obfuscated for sure. But not as impressive, somehow...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Warp wrote:
>
>> What language is that?
>
> It parses as valid Haskell. I have no idea what in the name of God it
> actually does...
>
Well, if you look at it from a distance, it reads "RSA". So that gives
you a hint.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> It parses as valid Haskell. I have no idea what in the name of God it
>> actually does...
>>
>
> Well, if you look at it from a distance, it reads "RSA". So that gives
> you a hint.
Sure. But given that it defines a bunch of functions called "un", "po"
and so on... uh...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>>> It parses as valid Haskell. I have no idea what in the name of God it
>>> actually does...
>>>
>>
>> Well, if you look at it from a distance, it reads "RSA". So that gives
>> you a hint.
>
> Sure. But given that it defines a bunch of functions called "un", "po"
> and so on... uh...
>
It's not obfuscated if it has readable function names.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
OK, so I had a go at unscrambling this...
cox n = foldr (\x y -> 128 * y + x) 0 n
de n = un (\x -> (x `mod` 128, x `div` 128), (==0)) n
coll = un (\zs -> (take 35 zs, drop 35 zs), (==""))
pe (n,m) x = s (p (n `div` 2, m) x) `mod` m
p (n,m) x = if n==0
then 1
else (if even n then pe (n,m) x else po (n,m) x)
po (n,m) x = (x * p (n-1, m) x) `mod` m
un (f,p) n = if p n then [] else (let (a,b) = f n in a : un (f,p) b)
(g,s) = (\x -> x, \x -> x*x)
That last line is the best. I didn't even realise you could *do* that!
Very odd...
Right, so, let's do some analysis here.
- "g" is the identity function, and "s" is the square function.
- Apparently "un" is a list unfold function. It takes an integer and a
pair of functions. The second function tells it when to stop unfolding;
the first one actually does the unfold.
-- "coll" uses "un" to split a text string into blocks of 25 characters.
So idea why.
-- "cox" appears to be using a list fold to convert a list into a giant
code number. (Note that it works with arbitrary precision integers.)
"de" looks like it's trying to do the reverse operation.
- The "p" function appears to be trying to decide whether to call "pe"
or "po" depending on whether n is odd or even.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 14 Feb 2008 13:07:07 -0200, Nicolas Alvarez wrote:
> Invisible escribió:
>> I have no idea whether this is actually executable or whether it does
>> anything interesting, but somebody *clearly* has a lot of free time on
>> their hands....
>>
>>
> You haven't seen the International Obfuscated C Code Contest, have you?
Do they still hold that? I remember examples from the past of things
like a morse code translator and a source "picture" that was an ASCII
train.
Jim
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |