问题描述
我在尝试使用 pgp
解密文件夹中的所有 gpg
文件时遇到问题。解密工作正常,但总是要求输入密码,如果我不输入它,我将无法解密文件,但我在命令中写入我的密码,我认为它只是无法读取。
询问密码的照片
我在我的 power shell 脚本中使用它。
首先我导入 GnuPG
模块
import-module 'MYpach\GnuPG\GnuPG.psm1'
在此之后,我尝试了很多不同的代码,例如:
gpg --batch --yes --multifile --decrypt --passphrase Mypassphrase E:\Mypach\*.csv.pgp
gpg --passphrase-fd 0 --decrypt-files E:\Mypach\*.csv.pgp
gpg --multifile --decrypt --input E:\Mypach\*.csv.pgp --passphrase Mypassphrase
gpg --batch --yes --passphrase-fd 0 --multifile --decrypt E:\Mypach\*.csv.pgp
echo Mypassphrase | gpg --batch --yes --passphrase-fd 0 --multifile --decrypt E:\Mypach\*.csv.pgp
gpg --passphrase "Mypassphrase" --batch --quiet --yes --multifile --decrypt E:\Mypach\*.csv.pgp
但还是一样,要求密码短语或只是脚本永远不会结束(始终运行)
gpg --version
gpg (GnuPG) 2.2.27
libgcrypt 1.8.7
copyright (C) 2021 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY,to the extent permitted by law.
Home: C:Patch/gnupg
Supported algorithms:
Pubkey: RSA,ELG,DSA,ECDH,ECDSA,EDDSA
Cipher: IDEA,3DES,CAST5,BLOWFISH,AES,AES192,AES256,TWOFISH,CAMELLIA128,CAMELLIA192,CAMELLIA256
Hash: SHA1,RIPEMD160,SHA256,SHA384,SHA512,SHA224
Compression: Uncompressed,ZIP,ZLIB,BZIP2
知道如何解决吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)