hieroglyphy icon indicating copy to clipboard operation
hieroglyphy copied to clipboard

What about decoding ?

Open mithuns opened this issue 7 years ago • 4 comments

I am a bit new to this , so forgive me if I sound like I dont understand this, I think the encoding is non-deterministic, for instance, there are multiple encodings that can be produced from a source String, does that make decoding impossible ? Is there a decoder available somewhere ?

mithuns avatar Jan 31 '18 03:01 mithuns

It's very deterministic, but decoding is annoying because it generally requires an actual browser and a js runtime for it to run properly. A decoder could certainly be written, but it would have to emulate the runtime environment pretty well, or make some possibly very brittle assumptions and apply the same logic a js runtime would to the characters (stuff like what does it mean to add a number to a char vs a char to a number as js does not treat these the same).

kernelsmith avatar Jan 31 '18 04:01 kernelsmith

@kernelsmith's is right. Prepack was as he described. I haven't tried it on hieroglified code, but it may work.

alcuadrado avatar Jan 31 '18 15:01 alcuadrado

https://github.com/masx200/JSfuck-and-hieroglyphy-Decoder-and-ENCODER

这是非常确定的,但解码很烦人,因为它通常需要一个实际的浏览器和一个js运行时才能正常运行。解码器肯定可以编写,但它必须很好地模拟运行时环境,或者做一些可能非常脆弱的假设,并将js运行时应用于字符的相同逻辑(类似于添加数字的意义)一个char与一个char到一个数字,因为js不会对它们进行相同的处理)。

我对此有点新意,所以请原谅我,如果我听起来像我不明白这一点,我认为编码是非确定性的,例如,有多种编码可以从源字符串产生,这会使解码变得不可能? 某处有解码器吗?

https://github.com/masx200/JSfuck-and-hieroglyphy-Decoder-and-ENCODER

masx200 avatar May 08 '19 00:05 masx200

我还 写了一个解码程序看我的github上有。 I also wrote a decoding program to see on my github. https://github.com/masx200/JSfuck-and-hieroglyphy-Decoder-and-ENCODER

masx200 avatar May 08 '19 00:05 masx200