fbdtemme / torrenttools

Commandline tool for inspecting, creating and editing BitTorrent metafiles.
MIT License
200 stars 16 forks source link

torrent files with protocol v2 is corrupted #55

Open stamepicmorg opened 1 month ago

stamepicmorg commented 1 month ago

torrent files with protocol v2 is corrupted - piece layer is invalid

milahu commented 2 weeks ago

this happens only with some torrent files

https://github.com/milahu/torrenttools-sample-torrents

test.sh ``` #!/usr/bin/env bash for f in *.torrent; do echo "$f" for p in 1 2 hybrid; do echo $p torrenttools show infohash --protocol=$p "$f" done echo done ```
$ ./test.sh
99.Francs.2007.French.BluRay.720p.AC3.x264.hardsubs_1_14_30.torrent
1
Error: parse error for field "piece layers": missing field
2
Error: parse error for field "piece layers": missing field
hybrid
Error: parse error for field "piece layers": missing field

Argos-Translate-LibreTranslate-2022-04-30.v12.torrent
1
8f8e3e8738403cf43654f6ba92380fa7c9b6b40a
2
88a0ffa6c3b7065a594539d6c942baf0a67443104fb580a3e243e67bae3fbc07
hybrid
8f8e3e8738403cf43654f6ba92380fa7c9b6b40a
88a0ffa6c3b7065a594539d6c942baf0a67443104fb580a3e243e67bae3fbc07

The.East.2013.German.Audiotrack.17khz.torrent
1
2f1b3237f673d51473264120af9d753a40ba4a4d
2
2f1b3237f673d51473264120af9d753a40ba4a4d
hybrid
2f1b3237f673d51473264120af9d753a40ba4a4d
stamepicmorg commented 1 week ago

this happens only with some torrent files

may be, but it happens. and it is very sad :(