[bittorrent] Fwd: Tracker response
andmart at gmail.com
Fri Jun 12 22:20:08 EDT 2009
Thanks all. I really don't know where I took info that I should send
the hash of piece. Now, I fixed my code and it's working.
Thanks again to all.
2009/6/11 Christopher Kastorff <encryptio at gmail.com>:
> 2009/6/11 André Martins <andmart at gmail.com>:
>> info_hash = urllib.quote( info['pieces'][:20])
> The info hash is defined to be the sha1 hash of the bencoded content
> of the info key of the torrent - definitely NOT the hash of the first
> piece in the torrent, as you are retrieving there. Don't worry about
> tricks to avoid bencoding it, it's not worth the trouble. Simply
> bencode the value of the info variable (in your code), hash the
> encoded result, quote it, and you're done.
> Chris Kastorff
More information about the BitTorrent