我正在对 android 应用程序进行逆向工程。并且需要反序列化在android com.db4o 类中序列化的sqllite3 blob 数据。
在代码谷歌网站上找到了 python-javaobj 项目。http://code.google.com/p/python-javaobj/
但实施有点棘手。
方法一、在python中用sqllite访问。
import sqlite3
conn=sqlite3.connect('sqlite3.db')
c = conn.cursor()
c.execute('select binaryfield from sqltable')
blob=c.fetchone()
blobstring=blob[0]
import javaobj
marshaller = javaobj.loads(blobstring)
错误信息
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/javaobj-0.1.0-py2.6.egg/javaobj.py", line 44, in loads
File "/usr/lib/python2.6/site-packages/javaobj-0.1.0-py2.6.egg/javaobj.py", line 155, in __init__
File "/usr/lib/python2.6/site-packages/javaobj-0.1.0-py2.6.egg/javaobj.py", line 178, in _readStreamHeader
IOError: The stream is not java serialized object. Invalid stream header: 00000005
我想知道是否还有其他方法。