python-javaobj
python-javaobj copied to clipboard
RuntimeError: Unknown OpCode in the stream: 0x8 ?
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)
I'm trying to solve it with a full rewrite of the parsing implementation. See the Core Rewrite project for more information
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?