In MMO game user account statistics stored in .dat file. I know this is python pickle.
Im not professional in py (really i dont know this language) all then i can wrote
data = pickle.load(fp)
pprint.pprint(data)
And i get output like these
(8,
{(2, 1): (1315840806,
'\x14\x00&#nNWH\x00\x00\x06\x90\xb3\x00\... lostsa bytes),
(2, 17): (1327141794,
"\x14\x00\xa2\x93\x1aOS=\x00\x00\x06T\xaa\x00\x00\x8d\x06>\x00\x00\x00*\...
I wanna to extract information from this. Format should be like these
offs byte
0 11
1 00
2 ac ;last batt time(4)
3 8d ;last batt time(4)
4 54 ;last batt time(4)
5 4d ;last batt time(4)
6 e8 ;battle lifetime(4)
7 69 ;battle lifetime(4)
8 00 ;battle lifetime(4)
9 00 ;battle lifetime(4)
10 04 ;maxfrags (1)
11 db ;xp (4)
12 95 ;xp (4)
13 00 ;xp (4)
14 00 ;xp (4)
15 6f ;maxXP (2)
16 06 ;maxXP (2)
and so on…
I has no idea how to get byte code in python, and what king of data is
(8,
{(2, 1): (1315840806,
object? array? How to iterate over it. And how i can save data as binary string to analyse it? Code sample is appreciated, but some ways to move on should be useful to. Thanx.
[]denote lists,()denote tuples (immutable lists), and{}denote dictionaries (i.e. maps).Consider:
At the top level, this is a tuple:
8.(2, 1).1315840806followed by a string containing what looks like some binary data.Hope you get the idea.