superseedr 1.0.5

A BitTorrent Client in your Terminal.
1
2
3
4
5
6
7
8
9
10
11
12

import bencodepy

with open('/xxx.torrent', 'rb') as f:
    torrent_data = bencodepy.decode(f.read())

file_root = bytes.fromhex("e82c4f26ff76d7b43c2e5c82da226e6dcb34a148b4d6ac5232a026a45acfc863")
# Extracting from the piece layers dictionary
layers = torrent_data[b'piece layers'][file_root]
expected_hash = layers[252*32 : 252*32 + 32]

print(f"Piece 252 Expected Hash: {expected_hash.hex()}")