Browse Source

using pool.sks-keyservers.net for key servers

master
Micah Lee 9 years ago
parent
commit
1975654008
  1. 2
      README.md
  2. 12
      ascii_sign.py
  3. 2
      download_strong_set.py

2
README.md

@ -25,7 +25,7 @@ ASCII sign a PGP key @@ -25,7 +25,7 @@ ASCII sign a PGP key
ascii_sign.py is a script that takes a filename and a target key id as input. It downloads the target key, then generates a new PGP for each line in the file. It signs the target key with the new keys and pushes everything to the pgp.mit.edu key server. Essentially, it lets you sign any key with ASCII art.
For example, check out my key: http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x5C17616361BD9F92422AC08BB4D25A1E99999697
For example, check out my key: http://pool.sks-keyservers.net:11371/pks/lookup?op=vindex&search=0x5C17616361BD9F92422AC08BB4D25A1E99999697
ASCII sign a key like this:

12
ascii_sign.py

@ -10,13 +10,13 @@ class TrollWoT_ASCIISign: @@ -10,13 +10,13 @@ class TrollWoT_ASCIISign:
def __init__(self, filename, target_keyid, homedir):
self.target_keyid = keyid
self.homedir = homedir
self.keyserver_url = "http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x{0}".format(keyid)
self.keyserver_url = "http://pool.sks-keyservers.net:11371/pks/lookup?op=vindex&search=0x{0}".format(keyid)
self.fingerprints = [self.target_keyid]
self.gpg = gnupg.GPG(gnupghome=homedir, gpgbinary=cwd+'/lib/gnupg/g10/gpg', verbose=False)
# download target key
print 'Downloading key {0} from pgp.mit.edu'.format(keyid)
print 'Downloading key {0} from pool.sks-keyservers.net'.format(keyid)
self.recv_key(self.target_keyid)
# generate new keys
@ -66,13 +66,13 @@ class TrollWoT_ASCIISign: @@ -66,13 +66,13 @@ class TrollWoT_ASCIISign:
def recv_key(self, fingerprint):
keyid = fingerprint[-8:]
print 'Receiving key {0} from pgp.mit.edu'.format(keyid)
subprocess.Popen(['gpg', '--homedir', self.gpg.gnupghome, '--keyserver', 'pgp.mit.edu', '--recv-keys', keyid]).wait()
print 'Receiving key {0} from pool.sks-keyservers.net'.format(keyid)
subprocess.Popen(['gpg', '--homedir', self.gpg.gnupghome, '--keyserver', 'pool.sks-keyservers.net', '--recv-keys', keyid]).wait()
def send_key(self, fingerprint):
keyid = fingerprint[-8:]
print 'Sending key {0} to pgp.mit.edu'.format(keyid)
subprocess.Popen(['gpg', '--homedir', self.gpg.gnupghome, '--keyserver', 'pgp.mit.edu', '--send-key', keyid]).wait()
print 'Sending key {0} to pool.sks-keyservers.net'.format(keyid)
subprocess.Popen(['gpg', '--homedir', self.gpg.gnupghome, '--keyserver', 'pool.sks-keyservers.net', '--send-key', keyid]).wait()
if __name__ == '__main__':
# arguments

2
download_strong_set.py

@ -22,7 +22,7 @@ sys.path.append(cwd+'/lib/python-gnupg') @@ -22,7 +22,7 @@ sys.path.append(cwd+'/lib/python-gnupg')
import gnupg
class TrollWoT_DownloadWoT:
def __init__(self, gpg, keyserver = 'subkeys.pgp.net'):
def __init__(self, gpg, keyserver = 'pool.sks-keyservers.net'):
self.gpg = gpg
self.keyserver = keyserver

Loading…
Cancel
Save