MacOS 安裝 metasploit
阿新 • • 發佈:2018-12-12
1,系統環境
2,MacOS安裝rbenv
$ brew install rbenv
驗證是否正確設定了 rbenv
y50M:~ y50$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash Checking for `rbenv' in PATH: /usr/local/bin/rbenv Checking for rbenv shims in PATH: not found The directory `/Users/y50/.rbenv/shims' must be present in PATH for rbenv to work. Please run `rbenv init' and follow the instructions. Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20180822) Counting installed Ruby versions: none There aren't any Ruby versions installed under `/Users/y50/.rbenv/versions'. You can install Ruby versions like so: rbenv install 2.2.4 Checking RubyGems settings: OK Auditing installed plugins: O
3,rbenv安裝ruby
3.1列出所有版本
$ rbenv install -l
3.2安裝指定版本ruby
$ rbenv install 2.4.2
$ rbenv rehash
$ rbenv global 2.4.2 #將2.4.2設定成全域性
4,安裝Metasploit
$ git clone https://github.com/rapid7/metasploit-framework.git
5,更換gem源
5.1升級gem
$ sudo gem update --system
$ gem sources --remove https://rubygems.org/
5.3更新源
$ gem sources -a https://gems.ruby-china.com/
https://gems.ruby-china.com/ added to sources
0$ gem sources -l
*** CURRENT SOURCES ***
https://gems.ruby-china.com/
vim 安裝目錄metasploit-framework/Gemfile 修改source
#source 'https://rubygems.org'
source 'https://gems.ruby-china.com'
5.4安裝ruby依賴
$ sudo gem install bundler $ cd metasploit-framework/ $ rbenv rehash $ bundle install`` 參考: 1. [MAC OSX (10.11.3)安裝metasploit最佳實踐](https://www.jianshu.com/p/95e585684c57) 2. [在MAC上安裝MSF](https://www.rqbin.com/article/info/29) 3. [Metasploit 教程](https://www.fujieace.com/metasploit/tutorials.html) 4. [Homebrew安裝rbenv](https://github.com/rbenv/rbenv) 5. [Download RubyGems](https://rubygems.org/pages/download#formats) 6. [Error fetching https://gems.ruby-china.org/: bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)](https://www.cnblogs.com/joyce306/p/9542777.html)