Victor Castro
Victor Castro

Reputation: 1242

Torrent Tracker response seems not well formated

Today I try to understand (and maybe to implement) the Bittorrent Protocol.

I already well understood how to "decrypt" the content of a .torrent file and I sent a request to a Tracker with the extracted datas.

But, the response is not the expected one: The wiki about the Bittorent Tracker Protocol says that the response must contain, in the "peers" List of dictionaries corresponding to peers.

I am reading the response with a C# program and the only thing I have in the field is a Byte Array (byte[]) that contains 50-0B-3F-3F-00-00-50-0B-3F-3F-3F-3F if I convert it to a string with

BitConverter.ToString((byte[])peers)

The original response of the Tracker is:

d8:completei0e10:downloadedi2e10:incompletei2e8:intervali1970e12:min intervali985e5:peers12:P ?? P ????e

And my HTTP request to it was:

http://bt1.archive.org:6969/announce?info_hash=%ac%c3%b2%e43%d7%c7GZ%bbYA%b5h%1c%b7%a1%ea%26%e2&peer_id=ABCDEFGHIJKLMNOPQRST&ip=xxx.xxx.xxx.xxx&port=6881&downloaded=0&left=970

So I don't understand, what is wrong ?

Upvotes: 0

Views: 288

Answers (1)

Encombe
Encombe

Reputation: 2090

The tracker response is in compact=1-form, which is more or less mandatory nowadays.

Specified here: BEP23 - Tracker Returns Compact Peer Lists

Upvotes: 1

Related Questions