Skip to content

Instantly share code, notes, and snippets.

@thedod
Last active December 11, 2015 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedod/4420ac3f3530da0baedc to your computer and use it in GitHub Desktop.
Save thedod/4420ac3f3530da0baedc to your computer and use it in GitHub Desktop.
Privacyfu - handy privacy-related commandlinefu-esque scripts
#!/bin/sh
# gpg to a keybase user or [unlike the keybase app] more than one
# Note: only encrypts. Doesn't do the usual metadata dance keybase is famous for
# **Example:** fubase.sh bob carol [< somefile]
# !!!!!!!!!!!!!!!!!!!!!!! uncomnent and change:
# export ME=alice
`(echo -n "gpg -u $ME@keybase.io -r $ME@keybase.io -eas " ; for r in $* ; do echo -n -r \""$r"\"\ ; done) | xargs` | xclip -sel clipboard
#!/bin/sh
# gpg to one or more recipients as --hidden-recipient [instead of as -r]
# This is recommended in situations where adversaries have access to ciphertext and recognize the recipient
# (e.g. this was a public tweet for `@alice` with URL of ciphertext pastebin), but perhaps are not linking
# between Alice and her public key [yet].
# I'd never think this was a concern, but a friend said it sometimes was, so there ;)
# NOTE: keybase client chokes on headerless gpg. Recipients should use "gpg classique"
# [to retrieve your private gpg key from keybase, simply run `keybase login` once ;)]
# **Example:** fustealth.sh bob@example.org carol@badexample.org [< somefile]
# !!!!!!!!!!!!!!!!!!!!!!! uncomnent and change:
# export ME=alice@goodexample.com
`(echo -n "gpg -u $ME -eas --hidden-recipient $ME " ; for r in $* ; do echo -n --hidden-recipient \""$r"\"\ ; done) | xargs` | xclip -sel clipboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment