While parsing a serialized com.sun.crypto.provider.SealedObjectForKeyProtector instance embedded in a JCEKS keystore, I received the output below. Used to work in v0.1.1.
I deliberately left ignore_remaining_data to False because the output shows that it seems to think half or so of the actual object is remaining data.
This is on Python 2.7.5 on CentOS 7:
ERROR:javaobj:==Oops state dump=============
ERROR:javaobj:References: [[com.sun.crypto.provider.SealedObjectForKeyProtector:0x-32A835A618CF44AD], [javax.crypto.SealedObject:0x3E363DA6C3B75470], '[B', 'Ljava/lang/String;', [[B:0x-530CE807F9F7AB20], [48, 13, 4, 8, 91, -81, 16, 100, -33, 73, -100, -99, 2, 1, 20], []]
ERROR:javaobj:Stream seeking back at -16 byte (2nd line is an actual position!):
ERROR:javaobj:Warning!!!!: Stream still has 230 bytes left.
ERROR:javaobj:00ED 49 9C 9D 02 01 14 75 71 00 7E 00 05 00 00 00 90 I.....uq.~......
00FD F0 2C CE F1 EB 76 CF 35 5A A6 3E 55 3B 24 37 44 .,...v.5Z.>U;$7D
010D 7F 25 45 D5 E2 3F 22 89 5B 1F DA 8F 8C 1D 8E 7A .%E..?".[......z
011D DC 36 D6 B5 D9 52 35 21 48 12 15 D3 85 D1 71 97 .6...R5!H.....q.
012D 10 3E 34 45 C9 0F 63 16 0C 53 6B 5B 3B 98 D7 D4 .>4E..c..Sk[;...
013D 04 0D 96 28 F1 09 E2 45 2B 16 69 0B B2 DC DB E3 ...(...E+.i.....
014D F8 1D CA 55 A1 D0 F2 C3 2F 6A 98 40 5F 62 0F 92 ...U..../j.@_b..
015D 88 92 3D 31 80 39 46 86 16 26 DA 7C 3B 2E 0B D8 ..=1.9F..&.|;...
016D F2 A8 C2 C3 42 7F 56 74 B0 06 A2 99 A7 6F 6E A1 ....B.Vt.....on.
017D 1B 6E 74 62 09 C5 49 41 0D 21 59 C2 5D 4F BE 5C .ntb..IA.!Y.]O..
018D 74 00 16 50 42 45 57 69 74 68 4D 44 35 41 6E 64 t..PBEWithMD5And
019D 54 72 69 70 6C 65 44 45 53 74 00 16 50 42 45 57 TripleDESt..PBEW
01AD 69 74 68 4D 44 35 41 6E 64 54 72 69 70 6C 65 44 ithMD5AndTripleD
01BD 45 53 EF 22 FC 75 BF F0 16 B1 B1 C2 5A 20 13 D5 ES.".u......Z ..
01CD BF E2 48 B2 AC 1F ..H...
ERROR:javaobj:==============================
Traceback (most recent call last):
File "main.py", line 20, in <module>
ks = jks.KeyStore.load(args.keystore_file, args.keystore_password)
File "/home/vmuser/pyjks/jks/jks.py", line 43, in load
return cls.loads(file.read(), password)
File "/home/vmuser/pyjks/jks/jks.py", line 146, in loads
sealed_obj, pos = _read_java_obj(data, pos, ignore_remaining_data=True)
File "/home/vmuser/pyjks/jks/jks.py", line 244, in _read_java_obj
obj = javaobj.load(data_stream)
File "/home/vmuser/.local/lib/python2.7/site-packages/javaobj.py", line 168, in load
return marshaller.readObject(ignore_remaining_data=ignore_remaining_data)
File "/home/vmuser/.local/lib/python2.7/site-packages/javaobj.py", line 495, in readObject
_, res = self._read_and_exec_opcode(ident=0)
File "/home/vmuser/.local/lib/python2.7/site-packages/javaobj.py", line 560, in _read_and_exec_opcode
return opid, handler(ident=ident)
File "/home/vmuser/.local/lib/python2.7/site-packages/javaobj.py", line 799, in do_object
res = self._read_value(field_type, ident, name=field_name)
File "/home/vmuser/.local/lib/python2.7/site-packages/javaobj.py", line 1002, in _read_value
_, res = self._read_and_exec_opcode(ident=ident + 1)
File "/home/vmuser/.local/lib/python2.7/site-packages/javaobj.py", line 560, in _read_and_exec_opcode
return opid, handler(ident=ident)
File "/home/vmuser/.local/lib/python2.7/site-packages/javaobj.py", line 883, in do_array
type_char = classdesc.name[0]
AttributeError: 'JavaArray' object has no attribute 'name'
Here's the input serialized object (run it through xxd -r to produce the binary file):
While parsing a serialized
com.sun.crypto.provider.SealedObjectForKeyProtector
instance embedded in a JCEKS keystore, I received the output below. Used to work in v0.1.1.I deliberately left
ignore_remaining_data
toFalse
because the output shows that it seems to think half or so of the actual object is remaining data.This is on Python 2.7.5 on CentOS 7:
Here's the input serialized object (run it through
xxd -r
to produce the binary file):