How to de-compile or view a .JX file from JXCore so that it is not garbeldy goop?

689 Views Asked by At

I have a JX file created with JXCore, but I would like to be able to view its source code/main code, but as of now it is just random symbols. I don't know if it's just the JX file viewer I am using (Notepad++), but I would like to know a way to de-compile the random text, or view it in a dedicated JX file viewer. An example of the way the code looks is:

xýY“¬@ží‡~—²ûti5óT×ôÀ@0L*™Œ9˜çñX÷뻪ZÝmGÒ‘ý;

Also, yes, running the script works great!

2

There are 2 best solutions below

0
On

There is no such thing like JX file viewer (nobody have created yet) but since JXcore is open source you may trace the code to see how jx package is compiled and how the package gets unpacked, too.

Jxcore package is a binary file, so Notepad is not useful here.

However from inside of your own package you may see what's there.

  1. Add this to your index.js file:

    var fs = require('fs');
    console.log(fs.readdirSync(__dirname));
    
  2. create a package

    jx package index.js myApp
    
  3. move the package to the empty folder and execute it from there:

    jx myApp.jx
    

It will display files located under root of your project.


You may also mark the package as extractable, so you don't need any JX file viewers:

jx package index.js myApp --extract
0
On

Ok, thanks everone, after a few hours I found out it was encrypted in zLib, and after a few more hours I was able to decrypt it with my team. Again, thanks!