Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined offset, Decompilation error #3

Open
PutterPlace opened this issue May 30, 2018 · 14 comments
Open

Undefined offset, Decompilation error #3

PutterPlace opened this issue May 30, 2018 · 14 comments

Comments

@PutterPlace
Copy link

PutterPlace commented May 30, 2018

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.

@Quantum64
Copy link

Right! We're all trying to decompile cash show...

@discoli-zz
Copy link

Welcome to the club!

@PutterPlace
Copy link
Author

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

@Quantum64
Copy link

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.

@PutterPlace
Copy link
Author

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.

@Quantum64
Copy link

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.

@PutterPlace
Copy link
Author

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

@Quantum64
Copy link

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.

@PutterPlace
Copy link
Author

I'll probably take a look into as well tomorrow. Much too tired atm. :-P

@WalkyRG
Copy link

WalkyRG commented Jun 6, 2018

Any progress on the issue ? I'm not able to decompile JSC files too..

@PutterPlace
Copy link
Author

None thus far. Sorry.

@irelance
Copy link
Owner

irelance commented Jun 7, 2018

That means my script do not work on your bytecode:

  1. Maybe my script decompile has some bugs (I am trying to rewrite the generate code process in the free time)
  2. Maybe your bytecode compile by different engine or different version (see issue2)

@Quantum64
Copy link

Have you had a chance to look into this @irelance?

Repository owner deleted a comment from naudachu Apr 27, 2024
@heliocosta-dev
Copy link

How did y'all end up with this? I'm in the exact same spot. Can read some strings but there's some weird bytes there as well. @Quantum64 @PutterPlace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants