Browse Source

fixed recv_key code in ascii sign, and updated readme

master
Micah Lee 9 years ago
parent
commit
8f6f7e79b5
  1. 11
      README.md
  2. 7
      ascii_sign.py

11
README.md

@ -20,6 +20,17 @@ Build the modified gnupg. @@ -20,6 +20,17 @@ Build the modified gnupg.
./configure
make
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
ASCII sign a key like this:
./ascii_sign.py ascii_art.txt KEYID
Brute force PGP key ID (inefficiently)
--------------------------------------

7
ascii_sign.py

@ -16,7 +16,7 @@ class TrollWoT_ASCIISign: @@ -16,7 +16,7 @@ class TrollWoT_ASCIISign:
# download target key
print 'Downloading key {0} from pgp.mit.edu'.format(keyid)
self.send_key(self.target_keyid)
self.recv_key(self.target_keyid)
# generate new keys
for userid in open(filename, 'r').read().strip().split('\n'):
@ -44,6 +44,11 @@ class TrollWoT_ASCIISign: @@ -44,6 +44,11 @@ class TrollWoT_ASCIISign:
print 'Signing key {0} with key {1}'.format(self.target_keyid, keyid)
subprocess.Popen(['gpg', '--homedir', self.gpg.gnupghome, '--batch', '--yes', '--status-fd', '1', '--default-key', keyid, '--sign-key', self.target_keyid]).wait()
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()
def send_key(self, fingerprint):
keyid = fingerprint[-8:]
print 'Sending key {0} to pgp.mit.edu'.format(keyid)

Loading…
Cancel
Save