Page 1 of 1

Debian Bittorrent tracker

PostPosted: 2019-04-09 18:09
by ihatetoregister
I'm writing a bittorrent client and was using the debian.iso torrent as an example file to download. I think I have found a possible bug in the implementation of the bittorrent tracker that is located at http://bttracker.debian.org so I was wondering if anyone have information of what BT tracker software that is running on this server? Could also be that my interpretation of the spec is wrong but I'm curios to know anyway :)

If anyone is interested, the problem I'm facing is in the announce response from the tracker:

Code: Select all
curl "http://bttracker.debian.org:6969/announce?info_hash=N%f5%ad%16%c0%9e%b5%0b%8c%3b%90~%02u%24%eeC%ad%ad%01&peer_id=%ff%fe%fd%fc%fb%fa%f9%f8%f7%f6%f5%f4%f3%f2%f1%f0%ef%ee%ed%ec&port=6881&uploaded=0&downloaded=0&left=659554304"


This yields the following response (bencode) (Part of response with ip adresses replaced with <ip-addr>, run curl command for full response)

Code: Select all
d8:intervali900e5:peers2:ip<ip-addr>4:porti6881e2:ip<ip-addr>4:porti6881e2:ip<ip-addr>4:porti6881e2:ip<ip-addr>4:porti6881e ... ee


The problem is that the peers is supposed to be a list of dictionaries, but instead is just a stings of keys and values with out the 'l' and 'd' prefixes causing my bencode parser to go bananas :P example:
Code: Select all
Actual response: 5:peers2:ip<ip-addr>4:porti6881e2:ip<ip-addr>4:porti6881e

Code: Select all
Expected response: 5:peersld2:ip<ip-addr>4:porti6881ed2:ip<ip-addr>4:porti6881ee


Bittorrent specification
http://www.bittorrent.org/beps/bep_0003.html

Torrent file
https://cdimage.debian.org/debian-cd/cu ... rch/bt-cd/