Skip to main content

Python helper package for implementing Onion Mirror Guidelines (OMG)

Project description

omg-py

Python helper for implementing the Onion Mirror Guidelines (OMG)

The Onion Mirror Guidelines are a set of rules enforced by the operator of DarkDotFail - a dark net directory of confirmed and official Tor .onions - to help improve the reliability of the information displayed on the website.

Practically, implementing the OMG shows a commitment to user safety by proving ownership of PGP keys on a regular basis.

Reference Specification

https://dark.fail/spec/omg.txt

Installation

This will install the omgpy package globally with pip

git clone https://code.samourai.io/walletguy/omg-py.git
cd omg-py
pip3 install .

Usage

Import OMG

from omgpy import OMG

Start OMG with the email address of the PGP key you want to sign with. This key must exist already and be correctly loaded in gpg. You can also use a key ID instead of an email address.

omg = OMG("email@example.com")

Define a template_path. If this directory exists then you must manually populate it with templates of the files that will be signed. If this directory doesn't exist currently, it will be created automatically in the next step and the default template files will be copied.

You can always add new template files to the Template directory, you are not limited by the default set.

omg.template_path = "/Desktop/omg/templates"

You can copy the default set of files that need to be signed in order to comply with the OMG by calling create_template_files after setting the template_path. This only needs to be done once (and it is optional - if you do not do this, you will need to manually create the template files and place them in your template_path directory.)

omg.create_template_files()

You can optionally declare where you would like the output saved. If this is not set the default location of the files will be in the current working directory where the script is called from.

omg.public_path = "/Desktop/omg/public"

You are ready to sign.

omg.sign()

When the files are signed, the output will be saved in a directory called public. In this directory will be two additional directories: signed and unsigned. The unsigned directory will contain the raw .txt file of what is to be signed and the signed directory will contain the corresponding clearsigned .txt.asc file.

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

omgpy-0.0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

omgpy-0.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file omgpy-0.0.1.tar.gz.

File metadata

  • Download URL: omgpy-0.0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for omgpy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3f20957c1def1a8d889b267f51f7d61eb5d1eccfaf43360f792f925a9f7faea0
MD5 125848ef2f7b4542a031735c62c1fa4c
BLAKE2b-256 37ebda0b7bf6222b66ba4135ca67908220b44e8de27964a97724e0e2a2d8e82a

See more details on using hashes here.

File details

Details for the file omgpy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: omgpy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for omgpy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e0aa2042d2fbf201220590019145428a9d68f9e9306b31de32290768a1aee0b
MD5 5a742354025c3d75d46b62ca6a98d8c0
BLAKE2b-256 e73acb559ed506d9db1caefcd9a5663bfad53999e246804c1a9e31f2379f7cfa

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