Skip to main content

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hairgap-1.2.3.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hairgap-1.2.3-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file hairgap-1.2.3.tar.gz.

File metadata

  • Download URL: hairgap-1.2.3.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.9 Darwin/25.1.0

File hashes

Hashes for hairgap-1.2.3.tar.gz
Algorithm Hash digest
SHA256 714fd48b56b047a710f22d8b473feccbb89cb9c4a394ffc0cb1cd0a8e6b2bbc3
MD5 4188d1594345a8c51a8cb8baa12d812f
BLAKE2b-256 fd9381130eddc52a5b504fa097163a9fd57fa14b5ba761dc4c051a150c5ea518

See more details on using hashes here.

File details

Details for the file hairgap-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: hairgap-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.9 Darwin/25.1.0

File hashes

Hashes for hairgap-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4eaaadeaddf416d8bd3c38b444a979f909f2f811633ead241c9e0c19829a1e11
MD5 0115470afe01f5989126eeec8bfe7090
BLAKE2b-256 49aa738cda0b39c980c0e1b09075b813c2ec806a7f6898f0295247265dbf6166

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page