decoding magnet uri from coppersurfer.tk scrape file

1.1k views Asked by At

i try to decode the hash to build magnet uri from scrape file (downloaded from coppersurfer.tk site)

after splitting the huge file

i try to decode the hash file

hash = hashlib.sha1(f).hexdigest() # hash info

and gotten list such as

6768033e216468247bd031a0a2d9876d79818f8f : {'downloaded': 2374, 'complete': 0, 'incomplete': 75}
e5eaaedf19d4602337c71b041a669b9d70bda764 : {'downloaded': 0, 'complete': 0, 'incomplete': 1}
a2e43672a55dcda5d6b1cbdf356da4f6a3e6178d : {'downloaded': 0, 'complete': 0, 'incomplete': 1}
ea01e99635aa17b7d9803c3004210202b1e9e612 : {'downloaded': 1, 'complete': 0, 'incomplete': 2}
b9c569eb1820a1a67633757fc96801ed0c8f3281 : {'downloaded': 1085, 'complete': 1, 'incomplete': 0}
92c9de8c9a40405f56aa5c4d55c22720a208207f : {'downloaded': 0, 'complete': 0, 'incomplete': 1}
a398de47b654426f4ef39054c8bbfe9f0348cd74 : {'downloaded': 304, 'complete': 1, 'incomplete': 0}
11a9f43eead2164042c87bf75fa72d885d4afe86 : {'downloaded': 0, 'complete': 0, 'incomplete': 1}
254b675173ccb75085a0e25a1da6c1ec2c5846a0 : {'downloaded': 0, 'complete': 0, 'incomplete': 1}

but when i combined it to create magnet uri such as

magnet:?xt=urn:btih:6768033e216468247bd031a0a2d9876d79818f8f

and try to download it in torrent client, it doesnt seems to work ( i try multiple other hashes with same result)

do you know what i need to do in order to decode the hash correctly?

thank you for your help

2

There are 2 answers

0
the8472 On

The scrape file should already contain the hashes for each torrent in their raw (20byte) representation, no additional hashing is required. All you need to do is to convert them to hex representation.

2
Encombe On

The scrape file full_scrape_not_a_tracker.tar.gz contains a bencoded full scrape and it seems from the examples, that it has been decoded correctly.

The conversion to magnet link is also done correctly.
However, a search for 6768033e216468247bd031a0a2d9876d79818f8f turns out that:

6768033e216468247bd031a0a2d9876d79818f8f = sha1( 0x0000000000000000000000000000000000000000 )

i.e it's not a real info_hash, so it's likely that the full scrape contains some bogus info_hashes.

It's probably better to test torrents where there are seeders,
i.e those there the 'complete' value is not zero.
So continue to test hashes and eventually one will turn out to be a real torrent.


Also, adding a tracker to the magnet link, will probably speed up the lookup a bit.

magnet:?xt=urn:btih:6768033e216468247bd031a0a2d9876d79818f8f&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969