WASM

发布于 4 小时前  1 次阅读


I've been researching WASM for a project, and here's a summary of what I found useful.

Have questions? Feel free to ask in the comments section below.

正文

A traditional way to protect a program running in browser is to 1) write the program in Javascript and 2) obfuscate it using a Javascript obfuscator:

An alternative strategy is to 1) write your program in C, 2) obfuscate it with a C-2-C obfuscator like Tigress, and 3) translate the resulting obfuscated code to WebAssembly using the

As you can see, emscripten actually produces 3 files, the actual webassembly, a javascript library, and the html file that gets loaded into the browser. Below is an example of how to first obfuscate a C program

argument to Tigress which specifies that the WebAssembly compiler (

) should be used, rather than the native C compiler:

EMSDKPATH=PATH_TO_EMSDK_INSTALLATION/emsdk/upstream/include/c++/v1

--Transform=Flatten --Functions=fib \ -s ALLOW_MEMORY_GROWTH=1 \

More Details

There are a few more points worth noting. First, browser compatibility varies across different browsers. Second, performance optimization is crucial when handling large amounts of data. Finally, key management is also an important consideration.

That's all for this comprehensive guide. I hope you found it helpful! Feel free to leave comments if you have questions.

Reference: WASM


点击体验一键VMP加密 |下滑查看JSVMP相关文章