Hacker News new | ask | show | jobs
by maeln 2386 days ago
WASM is a binary and a text format. You can turn any WASM binary to the text format and have a readable version of the blob. Firefox can automatically show you the text version of a WASM blob. So no, there is no difference with a minified JS. Just because there are in a text format don't make them any more easy to reverse engineer.
2 comments

Unless I'm completely missing something the "text version" you're talking about is just WASM and there's quite a difference between that and minified JS.

ex:

   end $label121
   get_local $var7
   get_local $var9
   call $func3444
   get_local $var7
   call $func1500
How is that any more readable than deobfuscated js?

    func1500(func3444(var7, var9), var7)
or more likely:

    gw(kl(s,i),s)
Yes this is what I am talking about. Once you know the instruction, I fail to see how it is more difficult to understand than javascript.
That's like saying x86_64 assembly is as easy to understand as C. High level languages exist to make code easier to understand.
wasm is higher-level than x86 (or any other native) assembly.
That certainly is a take.
There is a difference in degree, though. Unminified JS is usually easier to read than wasm text, in general.

One practical factor: I often debug wasm files by compiling them to JS first.

At least wasm has structured control flow, which helps a lot. I wish wasm had even more readability features, personally.