0

When I double click on a file PGP SDA asks for passphrase. I am able to decrypt files with a .gpg extension using this script:

gpg --batch --yes --passphrase 12345 --decrypt-files *.gpg

But when I run the above command with *.exe it gives me unknown suffix error.

Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
  • Does this have anything to do with PowerShell? Are you trying to script this? – Charlie Joynt Jan 19 '18 at 20:58
  • I will be writing a script to do this for all the .exe files in a particular directory. – tech stack Jan 19 '18 at 21:03
  • Good stuff. You're in the right place for help with coding BUT at the moment this question looks more like "how do I use GPG"? Which is a bit off topic. The best way to get help on Stack Overflow is to start writing some code and ask (or search) precise questions as you hit each hurdle. – Charlie Joynt Jan 19 '18 at 21:08
  • Enumerate the files and rename them to `.gpg` before decryption. – Ansgar Wiechers Jan 20 '18 at 14:42
  • Changing the file type does not fix this. It gives an error saying **nothing is imported** when i try to open it. – tech stack Jan 22 '18 at 16:52
  • 1
    Are you certain your .exe files are actually valid, gpg-encrypted, files? I just tested on my system, I get the same 'unknown suffix' error when running against .gpg files renamed to .exe, but when I change the name back to .gpg they work just fine. – user8675309 Jan 22 '18 at 19:55
  • If i double click on .exe files it opens a dialog for PGP SDA. When i rename it to .gpg and run it gives me: **gpg: no valid OpenPGP data found** When i change it back to .exe it works fine. – tech stack Jan 22 '18 at 20:05
  • SDA (self-decrypting archive) seems to be something [PGP-specific](https://support.symantec.com/en_US/article.TECH149019.html), so it seems you either need PGP (rather than GnuPG) or somehow extract the actual encrypted data from the executable wrapper ([see here](https://stackoverflow.com/q/13960544/1630171)). – Ansgar Wiechers Jan 22 '18 at 23:58

0 Answers0