我正在编写一个脚本来自动化metasploit,现在我的脚本工作正常,直到我需要在终端上运行的命令,但是当我尝试运行我必须在内部执行的命令时metasploit控制台脚本停止,直到我手动退出控制台,然后它将从下一行继续。编写脚本在控制台内运行命令
当您运行metasploit时,它将在您可以运行命令的终端内部打开一个控制台(msfconsole)。
如何在我的脚本中添加特定命令以在控制台内部运行?
这些是我想要运行的命令:
msfconsole (this command starts the metasploit console, this command works fine in the script)
search netapi (This searches the exploit i want to use, now this command is to be entered inside the console which my script cannot do)
这一切的命令需要在控制台中输入后,控制台看起来是这样的:MSF>
什么是你的脚本是,shell脚本或Python或红宝石? – LethalProgrammer
其shell脚本 – HeroicJokester
你问在shell脚本中如何运行特定的命令,你的意思是'ls,cat,ps'是什么类型的命令? – LethalProgrammer