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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值