P2P Protocol

SLP

P2Pv1 Headers

Flags

The flags define the type of P2P message that is being sent.

  • 0x0 Normal Message
  • 0x1 Nak
  • 0x2 Ack
  • 0x4 Waiting for a pending invite
  • 0x8 Notify a binary error
  • 0x10 File
  • 0x20 Msn Object: Display Picture or Custom Emoticon Data
  • 0x40 Close session
  • 0x80 Error at transport layer protocol
  • 0x100 Direct Handshake
  • 0x1000000 Define data for File transfer

The footer is 4 bytes long (DWORD) in big endian. It represents the Application Identifier (AppID)

  • 0x0 Negotiating session
  • 0x1 MsnObject: Display Picture or Custom Emoticon
  • 0x2 File transfer
  • 0xB CustomEmoticon (0d11)
  • 0xC Display Image (0d12)

Refs

Msnobj based transfers

MSNObject Description

The MSNObject is the way of MSNP to identify contents: Display Pictures, Custom Emoticons, Backgrounds, Voice Clips, etc.

Format

The MSNObject has always the following format

<msnobj Creator="buddy@hotmail.com" Size="24539" Type="3" Location="TFR2C.tmp" Friendly="AAA=" SHA1D="trC8SlFx2sWQxZMIBAWSEnXc8oQ=" SHA1C="U32o6bosZzluJq82eAtMpx5dIEI="/>
Creator

This field specify the person who made the object, in other words, the sender. Typically is the address of the buddy.

Size

The total size of the data the object represents, in bytes.

Type

Indicates which kind of transaction this object describes.

The known types are documented in the Reference page.

Location

Contains the filename under which the filename will be, or has been stored.

Friendly

Contains the name of the picture in Unicode (UTF-16 Little Endian) format. The string is encoded with Base64. For most types of descpritors this field is a null character or 'AAA=' when encoded.

SHA1D

The SHA1D field contains the SHA1 hash of the images data encoded in Base64. It's also known as the Data Hash or the SHA1 Data Field.

SHA1C

Contains all previous fields hashed with SHA1, and then encoded in Base64. This field is better known as the Checksum or SHA1 Checksum Field. The string format must be hashed to get the resulting SHA1C value looks similar to:

Creatorbuddy1@hotmail.comSize24539Type3LocationTFR2C.tmpFriendlyAAA=SHA1DtrC8SlFx2sWQxZMIBAWSEnXc8oQ=

It is suspected, but not verified, that the order in which the fields are hashed must be the same as the order of the fields in the XML format.

Sources

Msnpiki:MSNObject