gpg/fun
This commit is contained in:
parent
02132e9b3b
commit
63864cdca6
2 changed files with 51 additions and 0 deletions
50
in/public/security/gpg/fun.rst
Normal file
50
in/public/security/gpg/fun.rst
Normal file
|
@ -0,0 +1,50 @@
|
|||
“Choose” fingerprint
|
||||
====================
|
||||
|
||||
.. code:: bash
|
||||
|
||||
#! /bin/bash
|
||||
|
||||
mkdir --parents _
|
||||
|
||||
while true; do
|
||||
|
||||
gpg \
|
||||
--batch \
|
||||
--passphrase '' \
|
||||
--quick-generate-key \
|
||||
'First Last <first-last@domain.tld>' \
|
||||
ed25519 \
|
||||
cert \
|
||||
1y \
|
||||
&> /dev/null
|
||||
|
||||
gpg \
|
||||
--armor \
|
||||
--export-secret-keys \
|
||||
'First Last' > "tmp.gpg"
|
||||
|
||||
name=$(\
|
||||
cat tmp.gpg \
|
||||
| gpg --list-packets \
|
||||
| grep v4 \
|
||||
| awk -F ' ' '{print $9}' \
|
||||
| awk -F ')' '{print $1}' \
|
||||
)
|
||||
|
||||
name="${name:24:4}_${name:28:4}__${name:32:4}_${name:36}"
|
||||
echo "${name}"
|
||||
mv tmp.gpg "_/${name}"
|
||||
|
||||
rm openpgp-revocs.d/*
|
||||
rm private-keys-v1.d/*
|
||||
|
||||
gpg \
|
||||
--batch \
|
||||
--yes \
|
||||
--delete-keys 'First Last'
|
||||
|
||||
rm pubring.kbx*
|
||||
rm trustdb.gpg
|
||||
|
||||
done
|
|
@ -8,3 +8,4 @@ GnuPG
|
|||
configure
|
||||
generate
|
||||
servers
|
||||
fun
|
||||
|
|
Loading…
Reference in a new issue