Basic protocol to send files using the hairgap binary ( github.com/cea-sec/hairgap ).
Project description
Hairgap
Basic protocol to send files using the hairgap binary. The goal is to send random files through a unidirectionnal data-diode using UDP connections.
By default, hairgap can only send a file, without its name nor metadata. This Python library implements a basic protocol to send complete directories with checksums.
This protocol is customizable and the sender can add some attributes (a Dict[str, str]
) to each transfer.
- We assume that the hairgap binary is installed and in the PATH environment variable.
- The MAC adress of the destination must be known from the sender machine. You can inject this information into the ARP cache of the sender machine:
DESTINATION_IP="the IP address of the destination machine"
DESTINATION_MAC="the MAC address of the destination machine"
arp -s ${DESTINATION_IP} ${DESTINATION_MAC}
First, you must start the receiver on the destination side:
python3 -m pip install hairgap
DESTINATION_IP="the IP address of the destination machine"
pyhairgap receive ${DESTINATION_IP} directory/
Then you can send directories:
python3 -m pip install hairgap
DESTINATION_IP="the IP address of the destination machine"
pyhairgap send ${DESTINATION_IP} directory/
Hairgap binaries
You need to compile hairgap binaires yourself since no official package exists.
However, a Python package (hairgap-binaries
) has been created to distribute precompiled binaries for Linux x86_64.
This package is automatically detected and used.
python3 -m pip install hairgap-binaries
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hairgap-1.2.1.tar.gz
.
File metadata
- Download URL: hairgap-1.2.1.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.0 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ab1b066322df459d0edcc8662338c4eda9f2450481c9f0565090ee99258aa43 |
|
MD5 | afdc06a37b435c69576dd79bd791ca78 |
|
BLAKE2b-256 | 5939d3bdad00bea6b7c164e4a7b3c272b91b513b1fd77d556818024e0534bd0b |
File details
Details for the file hairgap-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: hairgap-1.2.1-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.0 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd70cc4a4db0d1bbaf2fb154243c9c2780a1f1a923f0177fac3d1018ccdc4606 |
|
MD5 | bfaf1314570fe8c58217b6295ac72b90 |
|
BLAKE2b-256 | 5620c62bc8b8adc736289765d92e1d86600cd860e635d51d4f2bfd88dd3d8839 |