gpg -ase -r 0xc1868032 -u '[email protected]' file
You need a passphrase to unlock the secret key for
user: "test (key) <[email protected]>"
2048-bit RSA key, ID C1CD62CB, created 2011-05-17
You need a passphrase to unlock the secret key for
user: "test (key) <[email protected]>"
我输入密码后,指令成功运行,用echo传递数值,不成功.
echo "mykey" | gpg -ase -r 0xc1868032 -u '[email protected]' file
运行后,还是出现
You need a passphrase to unlock the secret key for
user: "test (key) <[email protected]>"
2048-bit RSA key, ID C1CD62CB, created 2011-05-17
You need a passphrase to unlock the secret key for
user: "test (key) <[email protected]>"
请问,如何修改这个语句?
echo传递值
- lilydjwg
- 论坛版主
- 帖子: 4258
- 注册时间: 2009-04-11 23:46
- 系统: Arch Linux
- 联系:
Re: echo传递值
读取密码一般是直接读终端设置的,所以你需要用 expect。
- lexdene
- 帖子: 434
- 注册时间: 2010-02-21 16:19
- 来自: 大连
- 联系:
Re: echo传递值
有的程序为了安全,
在输入密码等重要信息的时候,
要求必须使用键盘输入,而不能使用管道及重定向。
在输入密码等重要信息的时候,
要求必须使用键盘输入,而不能使用管道及重定向。
大连Linux User Group: http://groups.google.com/group/dalian-lug?hl=zh-CN
-
- 帖子: 6548
- 注册时间: 2008-10-31 22:12
- 系统: 践兔
- 联系:
- lexdene
- 帖子: 434
- 注册时间: 2010-02-21 16:19
- 来自: 大连
- 联系:
Re: echo传递值
这是本质。tusooa 写了:大约是指定了/dev/tty
大连Linux User Group: http://groups.google.com/group/dalian-lug?hl=zh-CN