dumptorrent: view, validate .torrent files

cool_penguin_smallA .torrent file is a binary file. Once you download such a file to your system, how do you know from which tracker it is announced, or which files it will download? How about validating the .torrent file or checking how many are downloading the torrent?The cmdline utility dumptorrent might come in handy.

Features

  • Brief, verbose and raw modes for checking information
  • Shows size, file names, announce[-list], comment, publisher and info_hash among other info
  • Get downloader count from the tracker

Installation

You need to compile and use dumptorrent from source on Ubuntu. Download the package from the project homepage on SourceForge and run the following commands:

$ tar -xvf dumptorrent-version.tar.gz
$ cd dumptorrent-version
$ make

Usage

dumptorrent supports several switches. Use the --help switch to read more.

$ ./dumptorrent --help
Usage: ./dumptorrent [-t|-f field|-b|-v|-d|-s] [-w timeout] [-] files.torrent ...
 ./dumptorrent [-w timeout] -scrape url infohash

Options:
 -t: validate torrent files. only print the invalid files.
 returns 0 if all files are valid.
 -f : output a single field. one file a line. empty line on error.
 handy for scripting.
 field can be: name, TODO... 
 -b: brief dump
 -v: full dump
 -d: raw hierarchical dump
 -s: show scrape info
 -w: network timeout
 -scrape: scrape a hash value aginst a tracker
 e.g.: ./dumptorrent -scrape http://torrent.linux.duke.edu:6969/announce 61fbd245b29636cfa8c49cb2dabe7262f6db1e66

Most common use case example:

$ ./dumptorrent -v ../ubuntu-15.04-desktop-amd64.iso.torrent 
../ubuntu-15.04-desktop-amd64.iso.torrent:
Name: ubuntu-15.04-desktop-amd64.iso
Size: 1150844928 (1.07G)
Announce: http://torrent.ubuntu.com:6969/announce
Info Hash: 60827d6691f7cff3a45bc8ea52cc3cb48d3f3034
Piece Length: 524288 (512K)
Creation Date: Thu Apr 23 16:20:37 2015
Comment: Ubuntu CD releases.ubuntu.com
Files:
 ubuntu-15.04-desktop-amd64.iso 1150844928 (1.07G)
Announce List:
 http://torrent.ubuntu.com:6969/announce
 http://ipv6.torrent.ubuntu.com:6969/announce

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s