Mac的MSF"Could not find rake-xxx in any of the sources"报错和重新安装

使用报错

昨天MSF还正常使用,今天突然来个报错。

Could not find rake-12.3.1 in any of the sources
Run `bundle install` to install missing gems.

按照指示运行bundle install,缺失的gems安装完成。但是依旧报相同的错误。
然后尝试git fetch/msfupdate更新了一下。
更新后仍然相同错误。
gem info cake看到确实已经安装了对应版本了。查了一圈也没解决。

于是决定重新安装。我现在用的是直接从github clone下来的。决定换个方式安装,使用安装器。

重新安装

下载

版本 下载地址
最新的版本 https://osx.metasploit.com/metasploitframework-latest.pkg

安装

运行下载的pkg文件按照向导指引安装。

配置

macOS下Metasploit的可执行文件的位置为:

/opt/metasploit-framework/bin
➜  tree /opt/metasploit-framework/bin
/opt/metasploit-framework/bin
├── msfbinscan
├── msfconsole
├── msfd
├── msfdb
├── msfelfscan
├── msfmachscan
├── msfpescan
├── msfremove
├── msfrop
├── msfrpc
├── msfrpcd
├── msfupdate
└── msfvenom

编辑~/.zshrc文件:
注释掉之前msf的配置,添加环境变量:

export PATH="$PATH:/opt/metasploit-framework/bin"

刷新zsh后生效。
执行msfconsole进行初始化配置:

➜ msfconsole

 ** Welcome to Metasploit Framework Initial Setup **
    Please answer a few questions to get started.


Would you like to use and setup a new database (recommended)?
Please answer yes or no.
Would you like to use and setup a new database (recommended)? yes
Creating database at /Users/lanvnal/.msf4/db
Starting database at /Users/lanvnal/.msf4/db...success
Creating database users
Writing client authentication configuration file /Users/lanvnal/.msf4/db/pg_hba.conf
Stopping database at /Users/lanvnal/.msf4/db
Starting database at /Users/lanvnal/.msf4/db...success
Creating initial database schema
[?] Initial MSF web service account username? [lanvnal]: xxx
[?] Initial MSF web service account password? (Leave blank for random password):
Generating SSL key and certificate for MSF web service
Attempting to start MSF web service...success
MSF web service started and online
Creating MSF web service user msf

    ############################################################
    ##              MSF Web Service Credentials               ##
    ##                                                        ##
    ##        Please store these credentials securely.        ##
    ##    You will need them to connect to the webservice.    ##
    ############################################################

MSF web service username: xxx
MSF web service password: xxx
MSF web service user API token: xxxxxx

MSF web service configuration complete
The web service has been configured as your default data service in msfconsole with the name "local-https-data-service"

If needed, manually reconnect to the data service in msfconsole using the command:
db_connect --token 283adf2496b28811eb4630b82f8b4573d04cc67bc86069b6540f76560d3f226de5f442787e613033 --cert /Users/lanvnal/.msf4/msf-ws-cert.pem --skip-verify https://localhost:5443

The username and password are credentials for the API account:
https://localhost:5443/api/v1/auth/account


 ** Metasploit Framework Initial Setup Complete **


               .;lxO0KXXXK0Oxl:.
           ,o0WMMMMMMMMMMMMMMMMMMKd,
        'xNMMMMMMMMMMMMMMMMMMMMMMMMMWx,
      :KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK:
    .KMMMMMMMMMMMMMMMWNNNWMMMMMMMMMMMMMMMX,
   lWMMMMMMMMMMMXd:..     ..;dKMMMMMMMMMMMMo
  xMMMMMMMMMMWd.               .oNMMMMMMMMMMk
 oMMMMMMMMMMx.                    dMMMMMMMMMMx
.WMMMMMMMMM:                       :MMMMMMMMMM,
xMMMMMMMMMo                         lMMMMMMMMMO
NMMMMMMMMW                    ,cccccoMMMMMMMMMWlccccc;
MMMMMMMMMX                     ;KMMMMMMMMMMMMMMMMMMX:
NMMMMMMMMW.                      ;KMMMMMMMMMMMMMMX:
xMMMMMMMMMd                        ,0MMMMMMMMMMK;
.WMMMMMMMMMc                         'OMMMMMM0,
 lMMMMMMMMMMk.                         .kMMO'
  dMMMMMMMMMMWd'                         ..
   cWMMMMMMMMMMMNxc'.                ##########
    .0MMMMMMMMMMMMMMMMWc            #+#    #+#
      ;0MMMMMMMMMMMMMMMo.          +:+
        .dNMMMMMMMMMMMMo          +#++:++#+
           'oOWMMMMMMMMo                +:+
               .,cdkO0K;        :+:    :+:
                                :::::::+:
                      Metasploit

       =[ metasploit v5.0.74-dev-6b48337f3d056543875d02d65ca954b2d307fba4]
+ -- --=[ 1966 exploits - 1095 auxiliary - 337 post       ]
+ -- --=[ 558 payloads - 45 encoders - 10 nops            ]
+ -- --=[ 7 evasion                                       ]

msf5 > exit
发布了50 篇原创文章 · 获赞 12 · 访问量 6万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览