![]() Metainfo = bencode.bdecode(torrent_file.read()) The code takes the hashes contained in the info string: torrent_file = open(sys.argv, "rb") It can marshal lists, dictionaries, strings and numbers somewhat like JSON. Bencode is the serialization format used in. ![]() You need the bencode package to use this. Assuming you want to check a download for corruption you may find this useful. I wrote a piece of python code that verifies the hashes of downloaded files against what's in a.
0 Comments
Leave a Reply. |