casey / intermodal

A command-line utility for BitTorrent torrent file creation, verification, and more
https://imdl.io
Creative Commons Zero v1.0 Universal
487 stars 25 forks source link

Support infohash randomization #125

Open casey opened 4 years ago

casey commented 4 years ago

Add random integer under info.entropy. Not sure if there's any advantage to this over just setting info.source.

Hunter16g commented 8 months ago

Hello ! Are you still planning to add this feature in the future ? It would be appreciated as it has use cases :)

casey commented 8 months ago

Hi! I haven't figure out if it's actually useful. You can use the --source flag to include a random integer, which will randomize the torrent hash. What use-case for randomized infohashes are you interested in?

Hunter16g commented 8 months ago

At least one tracker uses both the source and entropy tags, so this would allow someone to create torrent files compliant with what's expected.

casey commented 8 months ago

Interesting! What's the expected format of the entropy tag? Like what datatype, and if it's bytes, how many?

Hunter16g commented 8 months ago

I don't think there's a standard content. https://github.com/rndusr/torf puts a 10 digit number I believe. Mktor from https://github.com/pyroscope/pyrocore has the option -X @entropy and apparently it's generating a 512bits number. Any random number would probably be fine I suppose

casey commented 8 months ago

This definitely seems reasonable to me. I'm not currently actively working on intermodal, but if someone wants to take a crack at it and open a PR, I think it shouldn't be too hard.