Get the App
SLTechnology News&Howtos  ›  Network Security  › 

How to reverse jsc to js in cocos2d-js

Shulou Source: shulou.com Published: 2022-05-31 22:33:45 11月15日 Update

What this article shares to you is about how jsc in cocos2d-js is reversed to js. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Jsc in cocos2d-js is reversed to a js file or bytecode.

Source code: https://github.com/zzwlpx/jsc-decompile-mozjs-34 (fork)

Usage:

1. You need to install php7.0 first

Download php7.0 to add environment variables

2. Modify php.ini

The size of memory_limit = 512m # can be adjusted according to your own memory size. If the value is set too small, it will crash when you reverse parse a larger jsc file.

3. Decompiled to js file

$php jsc2js.php * .jsc > test.js

4. Disassemble into js bytecode file

$php jsc-byte.php > test.bytecode

`

Effect:

After the restore, it is readable and cannot be run.

This is how jsc in cocos2d-js is reversed to js. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: File size byte more knowledge article practical large memory variable that is work meeting effect article source code environment see knowledge point industry details Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Microsoft MySQL Linux Shulou Tech Info