Skip to content

Commit

Permalink
Add initial implementation of imdl torrent verify
Browse files Browse the repository at this point in the history
Adds the command `imdl` torrent verify` to verify the contents of torrents.

This implementation is extremely naive. It does successfully verify torrents,
but it will produce unsatisfying results when a torrent fails verification. In
particular, it won't give any information about which pieces in a file were
corrupt.

type: added
  • Loading branch information
casey committed Apr 8, 2020
1 parent b0f449b commit 6549850
Show file tree
Hide file tree
Showing 28 changed files with 1,009 additions and 395 deletions.
96 changes: 69 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 23 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,44 @@ edition = "2018"
default-run = "imdl"

[dependencies]
ansi_term = "0.12"
atty = "0.2"
ansi_term = "0.12.0"
atty = "0.2.0"
chrono = "0.4.1"
env_logger = "0.7"
globset = "0.4"
libc = "0.2"
md5 = "0.7"
pretty_assertions = "0.6"
regex = "1"
serde_bencode = "0.2"
serde_bytes = "0.11"
serde_with = "1.4"
sha1 = "0.6"
snafu = "0.6"
static_assertions = "1"
globset = "0.4.0"
libc = "0.2.0"
md5 = "0.7.0"
pretty_assertions = "0.6.0"
pretty_env_logger = "0.4.0"
regex = "1.0.0"
serde-hex = "0.1.0"
serde_bytes = "0.11.0"
serde_with = "1.4.0"
sha1 = "0.6.0"
snafu = "0.6.0"
static_assertions = "1.0.0"
syn = "1.0.14"
tempfile = "3"
unicode-width = "0.1"
url = "2"
walkdir = "2.1"
tempfile = "3.0.0"
unicode-width = "0.1.0"
url = "2.0.0"
walkdir = "2.1.0"

[dependencies.bendy]
version = "0.2.2"
git = "https://github.com/casey/bendy.git"
branch = "value"
branch = "serde"
features = ["serde"]

[dependencies.serde]
version = "1.0.103"
features = ["derive"]

[dependencies.structopt]
version = "0.3"
version = "0.3.0"
features = ["default", "wrap_help"]

[dev-dependencies]
temptree = "0.0.0"

[workspace]
members = [
# generate table of contents and table of supported BEPs in README.md
Expand Down
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ default: watch

version := `sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/v\1/p' Cargo.toml | head -1`

bt := "0"

export RUST_BACKTRACE := bt

# watch filesystem for changes and rerun tests
watch:
cargo watch --exec test
Expand Down
Loading

0 comments on commit 6549850

Please sign in to comment.