我正在写一个脚本来自动化metasploit现在我的脚本工作得很好,直到我需要在终端上运行命令,但当我尝试运行我必须在metasploit控制台中执行的命令时,脚本将停止,直到我手动退出控制台,然后它将从下一行继续运行。
当您运行metasploit时,它会在终端中打开一个控制台(msfconsole),您可以在其中运行命令。
如何在脚本中添加特定命令以在控制台内运行??
以下是我要运行的命令:
msfconsole (this command starts the metasploit console, this command works fine in the script)
searc
我正在遵循这个指南。
我是这样做的:
cd /opt
git clone https://github.com/rapid7/metasploit-framework.git
cd metasploit-framework
当我在做:
git clone https://github.com/rapid7/metasploit-framework.git
我得到了以下错误:
fatal: could not create work tree dir 'metasploit-framework'.: Permission denied
我正在尝试访问Ruby-Resource脚本中到目前为止使用Metasploit收集的凭据。不幸的是,当我试图访问framework.db.creds时,我得到了以下错误。
>> framework.db.creds.each
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: missing FROM-clause entry for table "hosts"
LINE 1: SELECT "creds".* FROM "creds" WHERE (host
我正在尝试在OS X Yosemite上安装Metasploit框架,同时运行bundle install,安装程序在尝试安装metasploit-framework -v '4.10.1.pre.dev‘时卡住了。
当我自己运行gem install metasploit-framework -v '4.10.1.pre.dev'时,我得到了这个错误:
ERROR: Could not find a valid gem 'metasploit-framework' (= 4.10.1.pre.dev) in any repository
ERROR:
这是我的第一篇文章,所以我可能会把格式弄错。无论如何,在网上搜索了一个解决方案(我找不到)后,我求助于在这里询问。
在几天前启动我的msfconsole时,我开始收到所有这些以前没有显示的警告/错误。
$ sudo msfconsole
[!] The following modules could not be loaded!..\
[!] /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/host_id.go
[!] /usr/s
我在使用termux安装metasploit时,它显示:
~ $ ls <br>
metasploit-framework storage wiki-termux<br>
~ $ cd metasploit-framework<br>
~/metasploit-framework $ ruby msfconsole<br>
Could not find Ascii85-1.1.0 in any of the sources<br>
Run bundle install to install missing gems.<br&
我想启动metasploit服务来启动armitage。但是当我在控制台中输入命令时:
sudo service metasploit start
上面写着:
Failed to start metasploit.service: Unit metasploit.service not found.
我安装了metasploit。它连接到postgresql,所以问题是如何启动或安装此服务?
更新时出现GPG错误- Metasploit # curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && chmod 755 msfinstall && ./msfinstall
% Total % Received % Xferd Average Speed Time Time