Skip to main content

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.

Build Status Documentation Status PyPI version LGTM Grade

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

Metadata

Release files for hairgap 1.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hairgap 1.2.5
File Size Uploaded Provenance Actions
hairgap-1.2.5.tar.gz 18.0 kB Without provenance Details for hairgap-1.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hairgap 1.2.5
File Interpreter ABI Platform Actions
hairgap-1.2.5-py3-none-any.whl Python 3 none any Details for hairgap-1.2.5-py3-none-any.whl

Total release size: 44.6 kB

Release files / hairgap-1.2.5.tar.gz

Download URL hairgap-1.2.5.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aca0b58ac9ec6074885745a69ae13b899109edecba7002fadf37bc44248d0d75
BLAKE2b-256 checksum
How to use checksums
a2ac3afbccbf5558c5b5fc43fff789bd497febce686e8498b0893c26172819d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hairgap-1.2.5-py3-none-any.whl

Download URL hairgap-1.2.5-py3-none-any.whl
Size 26.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d95e9829530f2c2d9634909877056ef908939e579afd12a621ab2bd17a59aa63
BLAKE2b-256 checksum
How to use checksums
a7fb37d46fbdbfdcacd5a78c9d629ec443aa13400ef556fc4c16f90f547a651b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for hairgap 1.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page