Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about decoding ? #10

Open
mithuns opened this issue Jan 31, 2018 · 4 comments
Open

What about decoding ? #10

mithuns opened this issue Jan 31, 2018 · 4 comments

Comments

@mithuns
Copy link

mithuns commented Jan 31, 2018

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 ?

@kernelsmith
Copy link

kernelsmith commented Jan 31, 2018

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).

@alcuadrado
Copy link
Owner

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

@masx200
Copy link

masx200 commented May 8, 2019

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
Copy link

masx200 commented May 8, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants