Skip to content

Instantly share code, notes, and snippets.

Tom J tomholub

Block or report user

Report or block tomholub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tomholub
tomholub / wkd-python-client.py
Last active Aug 24, 2019
WKD (Web Key Directory) client for fetching OpenPGP public keys in python3, including a primitive z-base-32 implementation
View wkd-python-client.py
import requests
import requests.adapters
import requests.exceptions
from ssl import SSLError
import hashlib
# https://datatracker.ietf.org/doc/draft-koch-openpgp-webkey-service/?include_text=1
# https://www.sektioneins.de/en/blog/18-11-23-gnupg-wkd.html
class PubkeySource:
@tomholub
tomholub / sks_keydump_parse.py
Created Oct 23, 2017
Parsing SKS PGP Key Dump in Python
View sks_keydump_parse.py
import openpgp
from datetime import datetime
# from validate_email import validate_email
pubkeys = []
with open('/home/james/Desktop/sks/sks-dump-0000.pgp', 'rb') as fp:
s = datetime.now()
packets = openpgp.OpenPGPFile(fp)
print((datetime.now() - s).total_seconds())
You can’t perform that action at this time.