Wednesday, September 30, 2009

Most useful GPG Commands : you wont find this anywhere else on internet !

I spent more than 2 days to explore these commands on my own. No documentation, no forum, no post will explain below given points:

1. How to use passphrase in batch command ?

gpg -o "C:\Data_Readable.txt" --batch --passphrase-fd 0 < "C:\My_Passphrase.txt" -d "C:\Data_Encrypted.txt"

i.e. Passphrase is stored in a predefined file and its read from there.

 

2. How to use Fingerprint in delete batch command?


You banged your head against the wall and still getting below given error

gpg: key "61ED 3960 36C8 F91A 406B BEA0 4D3C 8843 3D2D 1636" not found: Unknown system error
gpg: 61ED 3960 36C8 F91A 406B BEA0 4D3C 8843 3D2D 1636: delete key failed: Unknown system error

Here is the right BATCH DELETE command:


gpg --batch --yes --delete-secret-and-public-key 61ED396036C8F91A406BBEA04D3C88433D2D1636

i.e. Fingerprint should not contain any spaces in between.

| namaste from Anugrah

No comments: