[package] name = "packetry" version = "0.4.0" authors = ["Great Scott Gadgets "] license = "BSD-3-Clause" description = "A fast, intuitive USB 2.0 protocol analysis application for use with Cynthion." categories = ["visualization"] keywords = ["cynthion", "luna", "usb"] homepage = "https://github.com/greatscottgadgets/packetry" repository = "https://github.com/greatscottgadgets/packetry" documentation = "https://packetry.readthedocs.io" edition = "2021" rust-version = "1.75" build = "src/build.rs" default-run = "packetry" include = [ "CHANGELOG.md", "CODE_OF_CONDUCT.md", "LICENSE", "README.md", "src/**/*", "tests/**/*", ] [build-dependencies] built = { version = "0.7.4", features = ["cargo-lock", "git2"] } [dependencies] bytemuck = "1.14.1" bytemuck_derive = "1.5.0" gtk = { version = "0.8.0", package = "gtk4" } num_enum = "0.7.2" once_cell = "1.19.0" pcap-file = "2.0.0" tempfile = "3.9.0" bitfield = "0.14.0" num-format = "0.4.4" humansize = "2.1.3" derive_more = "0.99.17" nusb = "0.1.10" futures-lite = "2.0.1" futures-channel = "0.3.21" futures-util = "0.3.21" serde = { version = "1.0.196", optional = true, features = ["derive"] } serde_json = { version = "1.0.113", optional = true } itertools = "0.12.1" arc-swap = "1.6.0" lrumap = "0.1.0" memmap2 = "0.9.4" page_size = "0.6.0" anyhow = { version = "1.0.79", features = ["backtrace"] } crc = "3.2.1" usb-ids = "1.2024.4" dark-light = "1.1.1" [dev-dependencies] serde = { version = "1.0.196", features = ["derive"] } serde_json = "1.0.113" rand = "0.8.5" rand_xorshift = "0.3.0" libfuzzer-sys = "0.4.7" [target.'cfg(target_os = "macos")'.dev-dependencies] procspawn = "1.0.0" ctor = "0.2.8" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3.9", features = ["wincon"] } # Note: All of the current features are for debugging purposes only! # # None of them should be enabled for normal builds of the application. # [features] # step-decoder: # # Used for debugging how transactions and transfers are interpreted # and displayed as their packets come in one by one. # # Listens on TCP port 46563 on 127.0.0.1 while loading a capture, # and feeds one packet to the decoder each time a byte is received # from a client connected to that port. # # To drive the single stepping, connect with a tool such as netcat, # i.e. 'nc 127.0.0.1 46563', and press enter to trigger each packet. # step-decoder = [] # record-ui-test: # # Used to record test cases to be executed as part of UI testing. # # Writes 'actions.json' and 'output.txt' files in the working directory. # These files capture the actions taken by the user, and the outputs # presented by the UI in response. # # To add the resulting test case to the test suite, copy these files to # a new subdirectory of tests/ui, renaming output.txt to reference.txt, # then add the name of the subdirectory to tests/ui/tests.txt. # # The test suite will then repeat these actions and verify that the UI # responds in the same way as it did previously. # # May be used concurrently with step-decoder, in order to produce test # cases that depend on when the UI was updated in the decoding process. # record-ui-test = ["serde", "serde_json"] # debug-region-map: # # Used for debugging the TreeListModel implementation. # # Prints information to standard output about the region map data structure # that is used internally by the model, and the changes being made to it. # debug-region-map = [] # fuzzer: # # Used for fuzzing the decoder. Does not affect the main binary, but enables # an example target named 'fuzzer'. # # Build the fuzzer with: # # cargo +nightly rustc --features fuzzer --example fuzzer -- \ # -C passes='sancov-module' \ # -C llvm-args='-sanitizer-coverage-level=3' \ # -C llvm-args='-sanitizer-coverage-inline-8bit-counters' \ # -Z sanitizer=address # # Run with: # # target/debug/examples/fuzzer # # Not currently working on Windows. fuzzer = [] [[bin]] name = "packetry" path = "src/main.rs" [[bin]] name = "packetry-cli" path = "src/cli.rs" [[example]] name = "fuzzer" path = "src/fuzzer.rs" required-features = ["fuzzer"] [package.metadata.cargo-all-features] skip_optional_dependencies = true