Skip to main content

A tiny library to handle and validate SSHFP DNS records.

Project description

Python-libsshfp

This is a tiny python library to handle and validate SSHFP DNS records.

It validates SSHFP records against permitted values from RFC 4255, RFC 6594, RFC 7479 and RFC 8709.

Installation

Use pip to install the package: pip install libsshfp.

Usage

First, find a text-based SSHFP DNS record, i.e. from gnu.org:

$> dig SSHFP gnu.org +short
1 1 A2B0FA94793B921FC7A835A313CE8557F8D989E1

Then import the library and let it do its magic:

>>> from libsshfp import SSHFP
>>> sshfp = SSHFP.from_string("1 1 A2B0FA94793B921FC7A835A313CE8557F8D989E1".lower()) 
>>> sshfp.algo_stringified()
'RSA'
>>> sshfp.type_stringified()
'SHA1'
>>> sshfp.fingerprint
'a2b0fa94793b921fc7a835a313ce8557f8d989e1'

>>> sshfp.to_dict()
{'algo': 'RSA', 'type': 'SHA1', 'fingerprint': 'a2b0fa94793b921fc7a835a313ce8557f8d989e1', 'domain': None, 'timestamp': None}
>>> sshfp.to_json()
'{"algo": "RSA", "type": "SHA1", "fingerprint": "a2b0fa94793b921fc7a835a313ce8557f8d989e1", "domain": null, "timestamp": null}'

TODOS

Contributions are welcome! Feel free to create a merge request :-)

  • Create more documentation
  • Further improve the library (?)

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

libsshfp-0.0.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

libsshfp-0.0.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file libsshfp-0.0.3.tar.gz.

File metadata

  • Download URL: libsshfp-0.0.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for libsshfp-0.0.3.tar.gz
Algorithm Hash digest
SHA256 0c9d097bcfe8d14eab9bacbfa72816add07318ac2f4d869ee6b416728bdeab2b
MD5 e32fd4fed8fda3f75cb82625c39c37b6
BLAKE2b-256 aeb65606ddbcb29122a84d9c57d31b640f6f4e25a41cd6f6e6bf2176403e1168

See more details on using hashes here.

File details

Details for the file libsshfp-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: libsshfp-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for libsshfp-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c76eb21413bece92340f36334a0fca9b10dfdef6a7f218607d5dc1735c275ad0
MD5 8824089c7ab6ea9a6ad00ba4dd3ba3d7
BLAKE2b-256 91cb79ebf4cfdadb6607db5b007a4f75949f01013a3fd684c527b843b0b2b907

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