Storage Format of QQ records

Source: Internet
Author: User

I am free recently .........

I want to decrypt msgex. DB and study it ......

Let's talk about its storage format ......

1 19''
2 21''
3 48 '0'
4 65 'A'
5 48 '0'
6 48 '0'
7 48 '0'
8 48 '0'
9 70 'F'
10 70 'F'
11 48 '0'
12 48 '0'
13 56 '8'
14 54 '6'
15 48 '0'
16 50'2'
17 23435 'song'
18 20307 'body'
19 13 '/R'

If you decrypt a chat record, it will end with a string similar to the above.

In fact, this string of characters is the format of recorded text.

1 19''
2 21''

I guess it's the starting mark.

3 48 '0'
4 65 'A'

These two fields are quite special. For (3), it is actually a hexadecimal number, that is, 0000 of the binary.

Where,

The first 0 represents whether it is in bold.

2nd 0 indicates whether to tilt

3rd 0 indicates whether to underline

4th zeros, which are related to the next word,

For (4), it indicates the font size. When the font size exceeds 16 (including 16), it cannot be expressed by a hexadecimal number.

At this time, 4th zeros are marked as 1, and the font size is expressed as 16 + (4 ).

That is, words of No. 18, which are not in bold and not skewed, are displayed as follows:

3 49 '1'
4 50'2'

 

While

5 48 '0'
6 48 '0'
7 48 '0'
8 48 '0'
9 70 'F'
10 70 'F'

The font color ......

The rest

11 48 '0'
12 48 '0'
13 56 '8'
14 54 '6'
15 48 '0'
16 50'2'

It is estimated that it is the word encoding ...... I don't know anything about it ......

Next

17 23435 'song'
18 20307 'body'

Represents the font name

Last

19 13 '/R'

It actually represents the number of bytes of values 13, namely (3)-(10) and (17)-(19) (the number of Chinese characters is 2 bytes ......

 

P.s.: I have observed and studied the above ...... Something wrong ...... Please advise ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.