Table of contents:

Introduction

MSNFTP is a subprotocol used for file transfers.
It was introduced officially in Client Version 3.0.0283.

This subprotocol is replaced with application/x-msnmsgrp2p type messages for clients that announce support, which would officially be Client Version 6.0.0602.

Commands

NOTE: Unlike the main protocol, MSNFTP does not feature Transaction IDs.
NOTE: Client and Server will be the the receiver and sender in this context.

VER

Protocol Version.

Client/Request

VER MSNFTP

Server/Response

VER MSNFTP

Example

C: VER MSNFTP
S: VER MSNFTP

USR

User identification.

Client/Request

None.

Server/Response

USR user-handle cookie

Where user-handle is the receiver's user handle.

Where cookie is the AuthCookie from the application/x-msmsgsinvite.

Example

C: USR example@hotmail.com 123456
S: FIL 11

FIL

File description.

Client/Request

None.

Server/Response

FIL size

Where size is the number of bytes the sender will send.

Example

C: USR example@hotmail.com 123456
S: FIL 11

TFR

Begin transfer. Announces that the receiver's mode is now set to only accept data messages.

Client/Request

TFR

Server/Response

None.

Example

NOTE: The binary data messages have been represented as hexadecimal.

C: TFR
S: 00 0b 00 68 65 6c 6c 6f 20 77 6f 72 6c 64
S: 01 00 00

BYE

Disconnect.

Client/Request

BYE reason

Where reason is:

Server/Response

None.

Example

C: BYE 16777989

Client disconnects from server.

CCL

Cancel. Used in place of BYE 2164261682.

Client/Request

CCL

Server/Response

None.

Example

C: CCL

Client disconnects from server.

Data messages

Data messages are a unique part of the MSNFTP subprotocol, and they are the majority of messages will are sent.

They are a binary format that consists of three bytes and then a possible payload:

  1. Either 0x00 (0) or 0x01 (1), if it is 1, this is the end of the transfer. No bytes should be sent.
  2. The size of the current chunk of the file data in a low-high format. For an example, 258 bytes (0x0102) will be 0x02, 0x01. This should be set to 0 on both bytes on the if the first value is 1.
  3. If the size is non-zero, the rest of the data is the current chunk.

The Official Client sends a maximum data message size of 2042 bytes excluding the header, and 2045 bytes including the header.

Example

NOTE: The binary data messages have been represented as hexadecimal.

C: VER MSNFTP
S: VER MSNFTP
C: USR example@hotmail.com 123456
S: FIL 11
C: TFR
S: 00 0b 00 68 65 6c 6c 6f 20 77 6f 72 6c 64
S: 01 00 00
C: BYE 16777989

Client disconnects from server.