配置msf连接postgresql数据库
BackTrack?5?R3版本的Metasploit在每次的升級后總會出現奇奇怪怪的錯誤,主要是Ruby的庫出錯,網上找了一些解決的辦法,但每次更新后又會出錯,蛋碎。
解決方法:
BackTrack 5中默認自動開啟端口7337。
1、查看PostgreSQL端口是否開啟:
root@bt:~# netstat -tnpl |grep postgres?
如果沒有開啟輸入service postgresql start開啟:
root@bt:~# service postgresql start?2、查看msf的配置,里面有數據庫用戶和密碼
root@bt:~# cat /opt/metasploit/config/database.yml
#
# These settings are for the database used by the Metasploit Framework
# unstable tree included in this installer, not the commercial editions.
#
development:
adapter: "postgresql"
database: "msf3dev"
username: "msf3"
password: "4bfedfc2"
port: 7337
host: "localhost"
pool: 256
timeout: 5
production:
adapter: "postgresql"
database: "msf3dev"
username: "msf3"
password: "4bfedfc2"
port: 7337
host: "localhost"
pool: 256
timeout: 5
?
3、開啟msf專業版
?
?
4、查看連接狀態:
db_status5、連接數據庫:
db_connect用戶名:口令@服務器地址:端口/數據庫名稱db_connect msf3:4bfedfc2@127.0.0.1:7337/msf3
?
6、使用hosts命令檢查數據庫是否可以正常使用。
msf > hosts?
?
7、使用db_disconnect命令可以斷開與數據庫的鏈接:
?
轉載于:https://www.cnblogs.com/Heta/p/10485690.html
總結
以上是生活随笔為你收集整理的配置msf连接postgresql数据库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Dubbo核心概念
- 下一篇: HTTP的长链接和短链接说明