gpt4 book ai didi

linux - 通过perl脚本在linux中登录密码提示

转载 作者:太空狗 更新时间:2023-10-29 12:06:11 27 4
gpt4 key购买 nike

我想通过 Perl 脚本传递密码。我基本上是在编写一个脚本来在 Linux 终端上执行命令。

在执行特定命令时,我得到提示

Password :← (I need to enter password here through my script)

但是,我的脚本停止工作了。

浏览后,我找到了 Expect 但我得到一个错误提示: Can't locate Expect.pm in @INC (@INC contains: C:/Perl/site/lib C :/Perl/lib.)

我之前没有使用过Expect,所以不知道我需要安装什么。

最佳答案

Expect.pm should work on Windows最新Cygwin .

如果我是正确的,您可以使用 PPM 安装 expect。但是,在我看来它可能不起作用:http://code.activestate.com/ppm/Expect/

看起来像IO-Tty无法在 Windows 上安装。它应该适用于 Cygwin。

关于linux - 通过perl脚本在linux中登录密码提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11236307/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com