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

RuntimeError: Unknown OpCode in the stream: 0x8 ? #30

Open
0ahu opened this issue Dec 10, 2019 · 2 comments
Open

RuntimeError: Unknown OpCode in the stream: 0x8 ? #30

0ahu opened this issue Dec 10, 2019 · 2 comments

Comments

@0ahu
Copy link

0ahu commented Dec 10, 2019

I use python-javaobj to deserialization java serialzied data, there is always a RuntimeError:Unknown OpCode in the stream: 0x8

i use

pobj = javaobj.loads(serialzied_data)

The file can be download at https://drive.google.com/open?id=1Gt5G_XyKPbJ--tvBH6bKX9j-JRvZ5FLD

Traceback (most recent call last):
  File "/var/www/core/bugly/code/CrashMain.py", line 38, in crash_main
    crash = AndroidCrash_v2(unziped_bytes)
  File "/var/www/core/bugly/code/AndroidCrash_V2.py", line 71, in __init__
    pobj = javaobj.loads(crash_data)
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 144, in loads
    BytesIO(string), *transformers, ignore_remaining_data=ignore_remaining_data
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 125, in load
    return marshaller.readObject(ignore_remaining_data=ignore_remaining_data)
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 530, in readObject
    _, res = self._read_and_exec_opcode(ident=0)
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 607, in _read_and_exec_opcode
    return opid, handler(ident=ident)
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 901, in do_object
    res = self._read_value(field_type, ident, name=field_name)
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 1133, in _read_value
    _, res = self._read_and_exec_opcode(ident=ident + 1)
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 607, in _read_and_exec_opcode
    return opid, handler(ident=ident)
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 920, in do_object
    opcode, obj = self._read_and_exec_opcode(ident=ident + 1)
  File "/var/www/venv/lib/python3.6/site-packages/javaobj/core.py", line 603, in _read_and_exec_opcode
    opid, position
RuntimeError: Unknown OpCode in the stream: 0x8 (at offset 0x77AF)
@tcalmant
Copy link
Owner

I'm trying to solve it with a full rewrite of the parsing implementation.
See the Core Rewrite project for more information

@tcalmant
Copy link
Owner

Hi,
I've tried with both implementations of JavaObj and with jdeserialize, and your file is not readable by any of them.
The issue is: array type listed, but typecode is not TC_ARRAY: 0x70

It seems the file is not stored as it should. Can you provide more information on the class that wrote this file?

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

2 participants