0x0 注釋source.list
debian的更新源。
0x1 添加Kali源,在source.list.d
新建kali.list,方便操作。
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
阿里雲的kali源
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
添加數字證書
$wget archive.kali.org/archive-key.asc //下載簽名
$apt-key add archive-key.asc //安裝簽名
更新包列表
$apt-get update
0x2 安裝postgresql
添加postgresql源
deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
安裝postgresql
$wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
//添加數字證書
$apt-get update
$apt-get install postgresql
0x3 安裝metasploit-framework
$apt-get install metasploit-framework #so easy
0x4 初始化metasploit-framework
$msfdb init
0x5 完成安裝,檢查
msf啟動
$msfconsole
檢測數據庫連接
msf>db_status
出現postgresql connected to xxx說明數據庫連接正常
報錯
warning: warning: deprecated Object#=~ is called on Integer; it always returns nil。
這個是我報告問題的路徑,打開文件,跳到84行
互換SIMPLE_INT與config,后添加.to_s(此處由於不將config,msfconsole 鏈接數據庫是會報錯,提示整型沒有轉字符串,導致打開無法鏈接)
def self.type_cast_config_to_integer(config)
if SIMPLE_INT =~ config.to_s
config.to_i
else
config
end
end