msnp-wiki/docs/commands/qry.md

1.6 KiB

Introduction

QRY is a command introduced with MSNP6.

It is a Notification Server command, WITH a request payload but without a response payload.

Responds to a challenge request (CHL command).

Client/Request

QRY TrID public-key length
payload

Where public-key is your client's Public Key.

Where length is the size (in bytes) of the payload.

Where payload is the challenge response.

Challenge responses

Calculating the challenge response depends on the version of the protocol you are using.

Basic responses

Only in MSNP6 to MSNP10.

Simply MD5 hash the challenge and your client's Private Key concatenated together as a string.

The output should be 32 bytes and lowercase hexadecimal.

Advanced responses

Since MSNP11.

Since this is more advanced of an algorithm, it will be avaliable as annotated source code in the Miscellaneous Files sectiom.

TODO: Write said annotated source code.

The output should be 32 bytes and lowercase hexadecimal.

Server/Response

QRY TrID

Examples

Successful response

S: CHL 12345678901234567890
C: QRY 1 msmsgs@msnmsgr.com 32
8ba1bb9d6dbf624fee31a2053af5fdd0
S: QRY 1

Failed challenge

NOTE: This happens as-is in MSNP11, since it isn't using the new method.

S: CHL 12345678901234567890
C: QRY 2 msmsgs@msnmsgr.com 32
8ba1bb9d6dbf624fee31a2053af5fdd0
S: 540 2

Server disconnects client.

Known changes

  • MSNP11: Changed challenge response generation algorithm drastically.