Path: blob/master/tools/dev/sign-dev-keys.sh
21467 views
#!/bin/bash12# Imports and signs dev keys fetched from Keybase, as asserted by the3# Metasploit-Framework development wiki. Requires bash version 3 or so for4# regular expression pattern match56COMMITTER_KEYS_URL='https://raw.githubusercontent.com/wiki/rapid7/metasploit-framework/Committer-Keys.md'7KEYBASE_KEY_URLS=$(8\curl -sSL $COMMITTER_KEYS_URL |9\awk '$4 ~/https:\/\/keybase.io\//' |10\sed 's#.*\(https://keybase.io/[^)]*\).*#\1/key.asc#'11)1213for key in $KEYBASE_KEY_URLS; do14echo [*] Importing $key15THIS_KEY=$(16\curl -sSL $key |17\gpg --no-auto-check-trustdb --import - 2>&1 |18\head -1 | \cut -f 3 -d " " | \sed 's/://'19)20echo [*] Signing $THIS_KEY21\gpg --sign-key $THIS_KEY22echo [*] Sending $THIS_KEY23\gpg --keyserver sks-keyservers.net --send-key $THIS_KEY24done25262728