Silk Road forums
Discussion => Security => Topic started by: asd159dasf1a6sd57a on August 23, 2012, 04:58 pm
-
Hello all..
I'm still new but wanted to share a quick and DIRTY script I wrote to help me communicate with the folks on SR.
This very simple script will encrypt a message you type out using the public block of the user you are sending the message to (must be loaded in your computer)
It will then copy the encrypted message AND your public block and put it in your clipboard. So all you have to do is paste it into the message box on SR and your set.
Please feel free update/change this script, I'm not coding god...
Also, Note that the script needs to know where your public key file is located. If you don't have it already just paste your block into a text file and point the script (line 20) to that file and you'll be set.
Here is the script
#!/bin/bash
#this script will encrypt text based on a preexisiting pgp key.
#enter message you wish to send
nano /tmp/message
text=`cat /tmp/message`
rm /tmp/message
#enter the ID you want to encode this message with
echo "Please enter Key ID to send to"
read keyid
#encrypt and print out the message
echo "Encrypted Text Below" > /tmp/message
echo >> /tmp/message
echo "$text" | gpg --encrypt --armor -r $keyid >> /tmp/message
echo >> /tmp/message
echo "My Public Block is below" >> /tmp/message
echo >> /tmp/message
#this section should be change to a text file where your public key is stored
#this will allow the script to also put your public block in your clipboard.
cat /path/to/your/public/key >> /tmp/message
cat /tmp/message | pbcopy
cat /tmp/message
echo ""
echo ""
echo ""
echo "your data has been copied into your clipboard"
rm /tmp/message