Metasploit支持MySQL、PostgreSQL和SQLite3數據庫。默認數據庫PostgreSQL。下面是PostgreSQL數據庫的簡單使用命令:sql
1.啓動數據庫子系統數據庫
/etc/init.d/postgresql start
2.鏈接數據庫(建立新的數據庫也是這個命令)。post
db_connect postgres:toor@127.0.0.1/msf
上面幾個參數的意思分別是:用戶名,密碼,運行數據庫系統的主機名,將要使用的數據庫名postgresql
kali中默認的用戶名是postgres,密碼是toor。code
3.確認數據庫鏈接是否正確。xml
db_status
4.將掃描結果的xml文件導入數據庫中it
db_import /home/output/subnet.xml
5.刪除原有數據庫import
db_destroy postgres:toor@127.0.0.1/msf3
6.斷開數據庫鏈接:密碼
db_disconnect postgres:toor@127.0.0.1/msf