metasploit-framework安裝
1.一條代碼就可以安裝了
apt-get install metasploit-framework
2.安裝完成後,首先啓動postgresql數據庫:
/etc/init.d/postgresql start
或者 service postgresql start
3. 設置postgresql開機自啓
update-rc.d postgresql enable
4.初始化MSF數據庫(關鍵步驟!):
msfdb init
msfdb init(默認創建數據庫名:msf,msf_test,用戶;msf;默認口令爲零;
5.運行msfconsole:
msfconsole
Kali Linux 2020.1a系統安裝後,啓動msfconsole將出現如下錯誤:
root@kali:~# msfconsole
[*] Bundler failed to load and returned this error:
'cannot load such file -- bundler / setup'
[*] You may need to uninstall or upgrade bundler
由於默認安裝的bundler的源失效,需要重新安裝。:
root@kali:~# gem install bundler
執行gem install bundler後報錯:
ERROR: Could not find a valid gem ‘bundler’ (>= 0), here is why:
Unable to download data from https://ruby.taobao.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://ruby.taobao.org/specs.4.8.gz)
原因是https://ruby.taobao.org/的RubyGems鏡像已經不再維護了,需要更換Gem Source,這裏我們直接換成Ruby China 鏡像。
更換RubyGems鏡像源
檢查現在用的源
$ gem sources -l
添加ruby-china的源,並刪除掉失效的源
$ gem sources --add https://gems.ruby-china.com/ --remove https://ruby.taobao.org/
確保只有 gems.ruby-china.com
$ gem sources -l
安裝bundler
$gem install bundler