jsc-decompile-mozjs-34
jsc-decompile-mozjs-34 copied to clipboard
Undefined offset, Decompilation error
When attempting to decompile this file, I only receive a bunch of errors:
Notice: Undefined offset: 3277386 in C:\Tools\jsc-decompile-mozjs-34-master\src\Xdr\Atom.php on line 25
Notice: Undefined offset: 3277385 in C:\Tools\jsc-decompile-mozjs-34-master\src\Xdr\Atom.php on line 25
Notice: Undefined offset: 3277388 in C:\Tools\jsc-decompile-mozjs-34-master\src\Xdr\Atom.php on line 25
...
I receive similar errors when attempting to decompile this file:
Notice: Undefined offset: 452315 in C:\Tools\jsc-decompile-mozjs-34-master\src\Xdr\Common.php on line 46
Notice: Undefined offset: 452316 in C:\Tools\jsc-decompile-mozjs-34-master\src\Xdr\Common.php on line 46
Notice: Undefined offset: 452317 in C:\Tools\jsc-decompile-mozjs-34-master\src\Xdr\Common.php on line 46
...
I've double-checked to make sure these two files are in accordance to a previously-posted issue. These files share the magic number you mentioned that this tool can decompile: 2C C0 73 B9
Any help would be greatly appreciated.
Right! We're all trying to decompile cash show...
Welcome to the club!
Tell me about it. I can connect to their websocket, but I can't figure out, for the life of me, how to communicate with it properly. I need the JS! :-P
I'm in exactly the same spot. Just looks like a stream of binary data in Wireshark, so there isn't much hope of blackboxing it.
The data is definitely hexadecimal, but I'm not sure of the formatting is all. You can read the strings inside the messages sent and received, but there's other data being sent and received along with it.
I mean you can represent binary data as hexadecimal digits. One byte can be represented as two characters from 0 to f. There's no such thing as "hexadecimal data". Typically when people refer to binary data, they mean "non-ascii" data, or not plaintext.
I know that. It's definitely being transmitted as binary data. I just mean that it's not completely unreadable if switched to hex or ascii. Just enough so to not be able to replicate it without more info. :-P
While we await @irelance's reply, I've done some research into this issue myself.
It appears that $parseIndex is extending past the number of bytes in the file, causing the undefined offsets in the $bytecodes array, which is just the file as a byte array. I'm still not sure what's causing this though.
I'll probably take a look into as well tomorrow. Much too tired atm. :-P
Any progress on the issue ? I'm not able to decompile JSC files too..
None thus far. Sorry.
That means my script do not work on your bytecode:
- Maybe my script decompile has some bugs (I am trying to rewrite the generate code process in the free time)
- Maybe your bytecode compile by different engine or different version (see issue2)
Have you had a chance to look into this @irelance?