A command-line utility to XOR two files. Useful for certain types of CTF challenge.
./xorfiles FILE1 FILE2
xorfiles FILE1 FILE2
xorfiles FILE1 < FILE2
git clone https://github.com/sciguy16/xorfiles
cargo build --release
cargo run --release -- -h
cargo install xorfiles
Benchmarks run with a 1 GB file XORed with itself, generated with
dd if=/dev/zero of=big_file bs=1M count=1000
. The Rust version was
tested in two operating modes: XOR two files together and one file with
stdin.
The following command was used to measure the throughput:
<implementation> big_file big_file | pv > /dev/null
| Implementation | Approx. throughput | |:--------------:|:------------------:| | Rust (files) | 6.5 MiB/s | | Rust (stdin) | 6.4 MiB/s | | Ruby | 2.45 MiB/s | | Python | 4.7 MiB/s |