rhash / RHash

Great utility for computing hash sums
http://rhash.sf.net
BSD Zero Clause License
560 stars 116 forks source link

Verifying torrents #234

Closed kickerofelves closed 1 year ago

kickerofelves commented 1 year ago

I'm using 1.4.3.

How do I verify downloaded torrents against a torrent file or bittorrent magnet link? Everything I've tried fails. Here's an example:

$rhash -c alpine-standard-3.17.2-x86_64.iso.torrent

--( Verifying alpine-standard-3.17.2-x86_64.iso.torrent )-----------------------
alpine-standard-3.17.2-x86_64.iso.torrent:1: can't parse line "d8:announce42:udp://tracker.opentrackr.org:1337/announce13:announce-listll42:udp://tracker.opentrackr.org:1337/announce36:udp://fosstorrents.com:6969/announceel46:udp://tracker.openbittorrent.com:6969/announceel45:http://tracker.openbittorrent.com:80/announceel41:udp://tracker.torrent.eu.org:451/announceel37:http://fosstorrents.com:6969/announceee7:comment125:Unofficial Alpine Linux 3.17.2 (Standard Edition - ) torrent created by FOSS Torrents. Published on https://fosstorrents.com/10:created by41:FOSS Torrents (https://fosstorrents.com/)13:creation datei1676396206e4:infod6:lengthi160432128e4:name33:alpine-standard-3.17.2-x86_64.iso12:piece lengthi131072e6:pieces24480:J"
alpine-standard-3.17.2-x86_64.iso.torrent:2: file is binary
rhash commented 1 year ago

Verification of torrent files is not supported and, regrettably, is not even planned.

kickerofelves commented 1 year ago

OK thanks. The first line of the readme makes it sound like this is something rhash does: "calculation and verification of magnet links and various message digests, including... BitTorrent BTIH"

rhash commented 1 year ago

BitTorrent BTIH stands for 'BitTorrent Info Hash', but not a 'BitTorrent file'.

BTIH verification is supported by RHash since

  1. BTIH can be used in magnet links,
  2. the goal of the program is to calculate and verify various file hashes.
sebbu2 commented 1 month ago

a bittorent file contains hashes of all the pieces of the files inside the torrent, so it would be worthfile for it to be supported. I personally see a .torrent file as halfway between a .sfv / .md5sum / .sha1sum / sha2-512sums. and a .par2 (or .par3) file.

Additional info : 1) the pieces might contains cross file boundaries, having null data (if it doesn't because of config), contain several files, etc... 2) there was several formats for it, but it's all clearly specified in the (various) specs