[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sks-devel] python scripts/other tools you may find useful

From: brent s.
Subject: [Sks-devel] python scripts/other tools you may find useful
Date: Mon, 16 Apr 2018 01:22:13 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Hey, all!

For starters, if any of you happen to be on Arch, I've packaged[0] a
patched version of SKS that will let you provide dumps of your database
from the same box you serve keys from with no downtime. (All it is is a
version of SKS with some filesystem paths changed and a
differently-named binary tied to those paths. You'd peer this to your
other instance - obviously they'll need to run on different ports - so
it stays in sync, and then you can stop that localized instance to dump
keys etc.)

Secondly, I'm not sure if I mentioned this before, but I have an SKS
dump wrapper script in python:

It has some nice features like being able to perform the dump on one box
and rsync to another, service handling, compression support, and even
pruning of dumps older than X days.

Similarly, I also have a script that will let you query a keyserver's
statistics on the commandline:

I find it a lot faster to use than browsing to a keyserver's keystats
page. Plus it has some nice features like being able to use it for a
module for another python program (since it's classed), JSON output or
YAML output (the default is "pythonic" output), etc.

address@hidden gpg]$ ./
{'keys': 5036849,
 'server': {'contact': '0x748231EBCBD808A14F5E85D28C004C2F93481F6B',
            'debug': 3,
            'hkp_port': 11371,
            'hostname': '',
            'name': '',
            'recon_port': 11370,
            'version': ('1', '1', '6')}}

address@hidden gpg]$ ./ --yaml
keys: 5036849
  contact: 0x748231EBCBD808A14F5E85D28C004C2F93481F6B
  debug: 3
  hkp_port: 11371
  recon_port: 11370
    - 1
    - 1
    - 6

address@hidden gpg]$ ./ --json
{"server": {"name": "", "hostname":
"", "version": ["1", "1", "6"], "contact":
"0x748231EBCBD808A14F5E85D28C004C2F93481F6B", "hkp_port": 11371,
"recon_port": 11370, "debug": 3}, "keys": 5036849}

(There's a "verbose" mode that will print all peers and key histograms
as well.)

Hope you find use for these!


brent saner
GPG info:

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]