Bitcoin Forum
November 14, 2024, 03:55:28 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: GPG shell help with stdin  (Read 1372 times)
salty (OP)
Full Member
***
Offline Offline

Activity: 562
Merit: 100



View Profile
September 08, 2012, 09:00:47 PM
 #1

Can anyone explain to me how to GPG decrypt my clipboard buffer instead of a file?

Here's what I've tried and it doesn't work..

type 'gpg' or 'gpg -d' in a shell

paste a pgp message (apple-V) into the shell

Huh nothing happens until I ctrl-c to close gpg down.

I guess I don't know what to do while gpg is running, and all the help files i can find seem to relate to operations on files

scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
September 08, 2012, 09:06:35 PM
 #2

Try ctrl-D after you paste, that signals "end of file" when reading from stdin.  GPG should then output the decrypted content.

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
salty (OP)
Full Member
***
Offline Offline

Activity: 562
Merit: 100



View Profile
September 08, 2012, 09:21:17 PM
 #3

nicely done Smiley thanks. Do you know if the 'ctrl-d' is a standard unix end of file signal or specific to gpg?
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
September 08, 2012, 09:23:05 PM
 #4

I use usually do
Code:
echo "SIGN THIS" | gpg -a -s
salty (OP)
Full Member
***
Offline Offline

Activity: 562
Merit: 100



View Profile
September 08, 2012, 09:29:12 PM
 #5

I use usually do
Code:
echo "SIGN THIS" | gpg -a -s

Cheers for the info, I got where I wanted with 'ctrl-d' though, pipes (is | a pipe?) are going to be for another day I think Wink
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
September 08, 2012, 09:36:21 PM
 #6

nicely done Smiley thanks. Do you know if the 'ctrl-d' is a standard unix end of file signal or specific to gpg?

Standard Unix when reading from stdin. Good question, forgot to mention that.

You might have to Ctrl-D a second time to fully terminate the reading -- the first one will just let the program read what you've typed so far, if it hasn't read it yet.  Anyway, glad it helped!

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!