metasploit连接postgres数据库

msf

百度百科

Metasploit是一款开源的安全漏洞检测工具,可以帮助安全和IT专业人士识别安全性问题,验证漏洞的缓解措施,并管理专家驱动的安全性进行评估,提供真正的安全风险情报。这些功能包括智能开发,密码审计,Web应用程序扫描,社会工程。团队合作,在Metasploit和综合报告提出了他们的发现。

环境:kali linux 2017

启动msfconsole

打开后显示数据库没有链接

解决方法如下

//启动对应的服务
root@kali:~# service postgresql restart root@kali:~# msfdb start root@kali:~# msfconsole msf > db_status [*] postgresql selected, no connection 数据库未连接 'msf > ' root@kali:~# msfdb -h Error: unrecognized action '-h' Manage a metasploit framework database msfdb init # initialize the database msfdb reinit # delete and reinitialize the database msfdb delete # delete database and stop using it msfdb start # start the database msfdb stop # stop the database //初始化数据库并重启 msfdb reinit msfdb start msf > msf > db_status [*] postgresql connected to msf db_discomnect 断开数据库 cat /usr/share/metasploit-framework/config/database.yml db_connect msf:s9qvzls1+7Bs4sfLg8nHeX7HaXG3aa8adMVfZDJotC8=@localhost/msf msf > db_ db_connect db_export db_nmap db_status db_disconnect db_import db_rebuild_cache msf > db_status [*] postgresql connected to msf msf > db_disconnect msf > db_connect msf:PtQ5o7VfChzWvvvrU5t8jTkFaHyApHjnJqnTuzR3ZHw=@localhost/msf [*] Rebuilding the module cache in the background... msf > db_status searsh

  

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值