szcf-weiya / techNotes

My notes about technology.
https://tech.hohoweiya.xyz/
11 stars 7 forks source link

decode dat file wechat #60

Closed szcf-weiya closed 1 year ago

szcf-weiya commented 1 year ago

1433 is frequent.

and note that the file header of different image files are:

julia> xor(0xffd8, 0x1433)
0xebeb

julia> xor(0xffd8, 0x62bb)
0x9d63

0xeb works for jpg file, however, it still failed when the 2nd byte is 140a,

$ xxd 070cbb2d7d54169369680ce59ef9e573.dat | head -1
00000000: 1433 140a b5e9 ae93 828d ebeb a6a6 ebc1  .3..............
julia> xor(0xebeb, 0x140a)
0xffe1

julia> xor(0xebeb, 0x140b)
0xffe0