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 (?)
Metadata
Release files for libsshfp 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| libsshfp-0.0.3.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libsshfp-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / libsshfp-0.0.3.tar.gz
| Download URL | libsshfp-0.0.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c9d097bcfe8d14eab9bacbfa72816add07318ac2f4d869ee6b416728bdeab2b
|
|
BLAKE2b-256 checksum How to use checksums |
aeb65606ddbcb29122a84d9c57d31b640f6f4e25a41cd6f6e6bf2176403e1168
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / libsshfp-0.0.3-py3-none-any.whl
| Download URL | libsshfp-0.0.3-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c76eb21413bece92340f36334a0fca9b10dfdef6a7f218607d5dc1735c275ad0
|
|
BLAKE2b-256 checksum How to use checksums |
91cb79ebf4cfdadb6607db5b007a4f75949f01013a3fd684c527b843b0b2b907
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|