Version 2 of Battle.net's file transfer protocol is a simple extension to version one, which allows Battle.net to validate a
CD key before allowing a file transfer to take place. The initial request is as follows:
(WORD) Length of this message
(WORD) Protocol Version
(DWORD) Platform ID
(DWORD) Product ID
(DWORD) Banner ID
(DWORD) BannerExtension
Battle.net responds to this request by sending a challenge in the form of the
Server Token to be used as part of the
CD key hash:
(DWORD) Server Token
The client should respond to this challenge with the following message:
(DWORD) Starting position (facilitates resuming)
(FILETIME) Local filetime
(DWORD) Client Token
(DWORD) Key Length
(DWORD) Key's product value
(DWORD) Key's public value
(DWORD) Unknown (Always 0)
(DWORD[5]) CD key data
(STRING) Filename
The
CD key is hashed in exactly the same manner as for
SID_AUTH_CHECK. If the key is rejected, the server disconnects. If the key is accepted, the server responds with the following message:
(DWORD) Length of this message (not including file data)
(DWORD) File size
(DWORD) Banner ID
(DWORD) Banner Extension
(FILETIME) Remote Filetime
(STRING) Filename
(VOID) File data
As indicated, the contents of the file follows this message. After sending the file, the server disconnects. If the Starting Position was specified in the challenge message, the server begins the transfer at this position in the file.
The Banner ID and Extension fields operate in exactly the same manner as in version 1 of the file transfer protocol. See [Battle.net's file transfer protocol (Version 1)] for more information.
#19
User Comments:None