animetosho / Nyuu

Flexible usenet binary posting tool
221 stars 32 forks source link

Feature request: Build NZBs from a single string #81

Closed trafgals closed 4 years ago

trafgals commented 4 years ago

Hey! Thank you for building an awesome program.

Currently your program (seems to) generate random strings to fill the NZB attributes, including subject, posters, etc. I am thinking it would be extremely useful if you generated these using a hash of an original string instead. The advantage of using a single string to define an NZB is that you don't need to store big files on online indexers anymore - they can just hold short strings. For obfuscation, we can include random text somewhere in the string.

So, for example, I enter a string for the file I want to post. Maybe I am posting a 100GB encode of the Creative Commons licenced movie Tears of Steel as a target upload. My base string might be Tears_of_Steel_1080p. Nyuu would then amend the size and Unix timestamp to create a NZB String like Tears_of_Steel_1080p_100GB_1509706265. From this NZB string, a full NZB can actually be rebuilt.

The NZB attributes inside the NZB file might be built as follows:

The downloader would then just keep looking for segments until the size target (100GB) is met. For 1MB files, there would be 100,000 segments in the above 100GB example. So the last segment-body would be sha2('segment100000'+ *NZB String* ). You'd then include pars in a similar way.

Alternatively, you could use the above structure to link to an encrypted and compressed NZB file that's posted to Usenet, where the real details of a file are stored. Not sure what the best approach would be, but it does make sense to use Usenet for large file storage.

animetosho commented 4 years ago

Thanks for all the information and detail!

I'm actually a bit confused as to what you're describing though.
If I understand correctly, you're suggesting deterministic Message-ID selection (instead of random)?

If so, I've seen the idea raised before.
Unfortunately, there's no commonly used standard, so there's no defined way to generally do it. Nyuu does provide the --message-id flag to give you control over this, though for your goal, you'll probably want to overwrite it in the Javascript config (you'll probably want to adopt the other headers according to your scheme as well).

Otherwise, if you're looking for a title to NZB converter (using the scheme you describe above), it's out of scope for Nyuu, as Nyuu is an uploader, but it shouldn't be too hard to create such a tool yourself, I'd imagine.

trafgals commented 4 years ago

If so, I've seen the idea raised before.

Ah great, that's the exact idea! The format from this developer is explored at length here.

I'll see if I can use this developer's program to build what I was hoping to build. Thanks!