hairgap


Namehairgap JSON
Version 1.2.1 PyPI version JSON
download
home_pagehttps://github.com/d9pouces/hairgap
SummaryBasic protocol to send files using the hairgap binary ( github.com/cea-sec/hairgap ).
upload_time2024-11-17 11:48:02
maintainerMatthieu Gallet
docs_urlNone
authorMatthieu Gallet
requires_python<4.0,>=3.9
licenseCECILL-B
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Hairgap
=======

Basic protocol to send files using the [hairgap binary](https://github.com/cea-sec/hairgap).
The goal is to send random files through a unidirectionnal data-diode using UDP connections.

[![Build Status](https://travis-ci.com/d9pouces/hairgap.svg?branch=master)](https://travis-ci.com/d9pouces/hairgap)
[![Documentation Status](https://readthedocs.org/projects/hairgap/badge/?version=latest)](https://hairgap.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/hairgap.svg)](https://pypi.org/project/hairgap/)
[![LGTM Grade](https://img.shields.io/lgtm/grade/python/github/d9pouces/hairgap)](https://lgtm.com/projects/g/d9pouces/hairgap/?mode=list)

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: 

```bash
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:
```bash
python3 -m pip install hairgap

DESTINATION_IP="the IP address of the destination machine"
pyhairgap receive ${DESTINATION_IP} directory/

```

Then you can send directories:
```bash
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.

```bash
python3 -m pip install hairgap-binaries
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/d9pouces/hairgap",
    "name": "hairgap",
    "maintainer": "Matthieu Gallet",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": "github@19pouces.net",
    "keywords": null,
    "author": "Matthieu Gallet",
    "author_email": "github@19pouces.net",
    "download_url": "https://files.pythonhosted.org/packages/59/39/d3bdad00bea6b7c164e4a7b3c272b91b513b1fd77d556818024e0534bd0b/hairgap-1.2.1.tar.gz",
    "platform": null,
    "description": "Hairgap\n=======\n\nBasic protocol to send files using the [hairgap binary](https://github.com/cea-sec/hairgap).\nThe goal is to send random files through a unidirectionnal data-diode using UDP connections.\n\n[![Build Status](https://travis-ci.com/d9pouces/hairgap.svg?branch=master)](https://travis-ci.com/d9pouces/hairgap)\n[![Documentation Status](https://readthedocs.org/projects/hairgap/badge/?version=latest)](https://hairgap.readthedocs.io/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/hairgap.svg)](https://pypi.org/project/hairgap/)\n[![LGTM Grade](https://img.shields.io/lgtm/grade/python/github/d9pouces/hairgap)](https://lgtm.com/projects/g/d9pouces/hairgap/?mode=list)\n\nBy default, hairgap can only send a file, without its name nor metadata. This Python library implements a basic protocol to send complete directories\nwith checksums. \n\nThis protocol is customizable and the sender can add some attributes (a `Dict[str, str]`) to each transfer.\n\n\n* We assume that the hairgap binary is installed and in the PATH environment variable.\n* 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: \n\n```bash\nDESTINATION_IP=\"the IP address of the destination machine\"\nDESTINATION_MAC=\"the MAC address of the destination machine\"\narp -s ${DESTINATION_IP} ${DESTINATION_MAC}\n```\nFirst, you must start the receiver on the destination side:\n```bash\npython3 -m pip install hairgap\n\nDESTINATION_IP=\"the IP address of the destination machine\"\npyhairgap receive ${DESTINATION_IP} directory/\n\n```\n\nThen you can send directories:\n```bash\npython3 -m pip install hairgap\n\nDESTINATION_IP=\"the IP address of the destination machine\"\npyhairgap send ${DESTINATION_IP} directory/\n\n```\n\nHairgap binaries\n----------------\n\nYou need to compile hairgap binaires yourself since no official package exists.\nHowever, a Python package (`hairgap-binaries`) has been created to distribute precompiled binaries for Linux x86_64.\nThis package is automatically detected and used.\n\n```bash\npython3 -m pip install hairgap-binaries\n```\n",
    "bugtrack_url": null,
    "license": "CECILL-B",
    "summary": "Basic protocol to send files using the hairgap binary ( github.com/cea-sec/hairgap ).",
    "version": "1.2.1",
    "project_urls": {
        "Documentation": "https://github.com/d9pouces/hairgap",
        "Homepage": "https://github.com/d9pouces/hairgap",
        "Repository": "https://github.com/d9pouces/hairgap"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5620c62bc8b8adc736289765d92e1d86600cd860e635d51d4f2bfd88dd3d8839",
                "md5": "bfaf1314570fe8c58217b6295ac72b90",
                "sha256": "fd70cc4a4db0d1bbaf2fb154243c9c2780a1f1a923f0177fac3d1018ccdc4606"
            },
            "downloads": -1,
            "filename": "hairgap-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bfaf1314570fe8c58217b6295ac72b90",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 34048,
            "upload_time": "2024-11-17T11:48:01",
            "upload_time_iso_8601": "2024-11-17T11:48:01.638878Z",
            "url": "https://files.pythonhosted.org/packages/56/20/c62bc8b8adc736289765d92e1d86600cd860e635d51d4f2bfd88dd3d8839/hairgap-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5939d3bdad00bea6b7c164e4a7b3c272b91b513b1fd77d556818024e0534bd0b",
                "md5": "afdc06a37b435c69576dd79bd791ca78",
                "sha256": "9ab1b066322df459d0edcc8662338c4eda9f2450481c9f0565090ee99258aa43"
            },
            "downloads": -1,
            "filename": "hairgap-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "afdc06a37b435c69576dd79bd791ca78",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 26473,
            "upload_time": "2024-11-17T11:48:02",
            "upload_time_iso_8601": "2024-11-17T11:48:02.636222Z",
            "url": "https://files.pythonhosted.org/packages/59/39/d3bdad00bea6b7c164e4a7b3c272b91b513b1fd77d556818024e0534bd0b/hairgap-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 11:48:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "d9pouces",
    "github_project": "hairgap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "hairgap"
}
        
Elapsed time: 0.31534s