diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-12-22 12:11:54 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-12-22 12:11:54 -0200 |
commit | e8c773aa03892bc905eefe8831c04b67c7978f6a (patch) | |
tree | 1807a63ea0213e1bfc92573e3d1cd5e1ed9f6062 /misc/poc/firma-0.1.5 | |
parent | 94e278671116bf229dca6932e0d6d1d7fc4edefc (diff) | |
download | firma-e8c773aa03892bc905eefe8831c04b67c7978f6a.tar.gz firma-e8c773aa03892bc905eefe8831c04b67c7978f6a.tar.bz2 |
Misc cleanup
Diffstat (limited to 'misc/poc/firma-0.1.5')
-rwxr-xr-x | misc/poc/firma-0.1.5 | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/misc/poc/firma-0.1.5 b/misc/poc/firma-0.1.5 deleted file mode 100755 index 029a09d..0000000 --- a/misc/poc/firma-0.1.5 +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -# -# firma v0.2: simple encrypted mailing list aliases -# feedback: rhatto@riseup.net | GPL -# -# list configuration is passed through a config file, -# where you put PARAMETER=value (whithout spaces) -# -# MAIL= path for mail program -# GPG= path for gnupg binary -# TMP= where you want the temp files -# LISTNAME= list email -# GPGDIR= gpg dir for the lists' keyring -# PASSWD= passwd for the lists' keyring -# FOOTER= message footer - -# eval the config file -source $1 - -GPGCOMMAND="$GPG -q --homedir $GPGDIR" -GPGLIST="$GPGCOMMAND --list-keys" -GPGDECRYPT="$GPGCOMMAND --decrypt" -GPGENCRYPT="$GPGCOMMAND --always-trust -e -s -a -r" - -rm $TMP $TMP.gpg -touch $TMP; chmod 600 $TMP; -touch $TMP.gpg; chmod 600 $TMP.gpg; - -# todo: use an array -while read STDIN; do - echo $STDIN >> $TMP -done - -# get the headers -FROM=$(grep -m 1 ^From: $TMP | cut -f 2 -d :) -DATE=$(grep -m 1 ^Date: $TMP) -SUBJECT=$(grep -m 1 ^Subject: $TMP) - -# detect the encrypted message -sed -n '/-----BEGIN PGP MESSAGE-----/,/-----END PGP MESSAGE-----/p' $TMP >> $TMP.gpg - -# encrypting and sending for each recipient on the list -for EMAIL in $($GPGLIST | grep pub | cut -d "<" -f 2 | sed -e 's/>//' | grep @ | grep -v $LISTNAME); do - - echo "$PASSWD - Message from: $FROM - $SUBJECT - $DATE - - $(echo "$PASSWD" | $GPGDECRYPT $TMP.gpg) - - --- - $FOOTER " | sed -e 's/=20$//' | $GPGENCRYPT $EMAIL | $MAIL -r $LISTNAME $EMAIL - -done - -rm $TMP $TMP.gpg |