Crates.io | hdmifiletransporter |
lib.rs | hdmifiletransporter |
version | 0.1.2 |
source | src |
created_at | 2023-04-18 23:57:05.141208 |
updated_at | 2023-04-21 23:31:14.885993 |
description | Proof of concept on transferring files using HDMI (video via HDMI) from one computer to another |
homepage | https://github.com/MrDesjardins/hdmifiletransporter |
repository | https://github.com/MrDesjardins/hdmifiletransporter |
max_upload_size | |
id | 843032 |
size | 87,476 |
This repository is a Rust implementation for a proof-of-concept to transfer files using video by leveraging HDMI from one computer and USB on a second computer. The computer sending the information might be in a secured environment with very restricted access to Internet or USB devices that can be connected. However, monitors are rarely a source targeted by security. Thus, the concept is to send files using HDMI and captured using a video card with USB on a second computer with no security restriction.
For details about the concept and code visit these articles:
The code base contains a Rust script that inject a file into a video file. Also, it does the other side: from video file to file.
What is out of scope is the HDMI part. The details can be found in the several articles written.
cargo add hdmifiletransporter
todo: Different options we can use with the CLI
This section is intended for developers who are contributing to this repository. They are few pointers to how to perform development tasks.
You need to install the right toolchain:
rustup toolchain install stable
rustup default stable
To perform test coverage you need to install
cargo install grcov
rustup component add llvm-tools-preview
To generate benchmark plots you need to install GnuPlot
sudo apt update
sudo apt install gnuplot
# To confirm that it is properly installed:
which gnuplot
To use opencv on WSL:
sudo su
apt install libopencv-dev clang libclang-dev
sudo apt install cmake
To get all options using cargo run
:
cargo run -- -help
cargo test
You must install few components before running coverage:
cargo install grcov
rustup component add llvm-tools-preview
Then, you can run:
./coverage.sh
Further explanation in the Mozilla grcov website
The documentation is generated from the source code using:
cargo doc --open -document-private-items
All commands for the user works but instead of using
hdmifiletransporter -m inject -i testAssets/test1.zip -o out1.mp4
cargo run -- -m inject -i testAssets/text1.txt -o outputs/out1.avi --fps 30 --height 1080 --width 1920 --size 1
cargo run -- -m inject -i testAssets/text1.txt -o outputs/out1.avi --fps 30 --height 1080 --width 1920 --size 1 -a bw
cargo run -- -m extract -i outputs/out1.avi -o outputs/text1.txt --fps 30 --height 1080 --width 1920 --size 1
cargo run -- -m extract -i outputs/out1.avi -o outputs/text1.txt --fps 30 --height 1080 --width 1920 --size 1 -a bw
cargo bench
cargo package --allow-dirty
Then go to hdmifiletransporter/target/package/
to see the content
cargo login
cargo publish --dry-run
cargo publish
You must install CodeLLDB if you want to set break point with VsCode.