Kali2017 Metasploit连接postgresql数据库
2024-08-31 05:34:28
msfdb:msf数据库管理命令
1、查看msf数据库连接状态
msf > db_status
[*] postgresql selected, no connection //未连接
2、msfdb命令
msf > msfdb //msfdb可以在命令行直接使用
[*] exec: msfdb 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 //停止数据库
3、初始化数据库
msf > msfdb init
[*] exec: msfdb init Creating database user 'msf'
为新角色输入的口令:
再输入一遍:
Creating databases 'msf' and 'msf_test'
Creating configuration file in /usr/share/metasploit-framework/config/database.yml
Creating initial database schema
4、查看msf数据库配置文件
root@kali:~# cat /usr/share/metasploit-framework/config/database.yml
development:
adapter: postgresql
database: msf
username: msf
password: EUsDzzKRsyxvmwmPI+dZ2KF1rojkKeEKqNRvNbV7LdY=
host: localhost
port:
pool:
timeout: production:
adapter: postgresql
database: msf
username: msf
password: EUsDzzKRsyxvmwmPI+dZ2KF1rojkKeEKqNRvNbV7LdY=
host: localhost
port:
pool:
timeout: test:
adapter: postgresql
database: msf_test
username: msf
password: EUsDzzKRsyxvmwmPI+dZ2KF1rojkKeEKqNRvNbV7LdY=
host: localhost
port:
pool:
timeout:
5、启动或重启msf
root@kali:~# msfconsole ______________________________________________________________________________
| |
| 3Kom SuperHack II Logon |
|______________________________________________________________________________|
| |
| |
| |
| User Name: [ security ] |
| |
| Password: [ ] |
| |
| |
| |
| [ OK ] |
|______________________________________________________________________________|
| |
| https://metasploit.com |
|______________________________________________________________________________| =[ metasploit v4.15.5-dev ]
+ -- --=[ exploits - auxiliary - post ]
+ -- --=[ payloads - encoders - nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ] msf > db_status
[*] postgresql connected to msf
最新文章
- centos7.x/RedHat7.x重命名网卡名称
- 小数量宽带用户的福音,Panabit 云计费easyradius 接口隆重发布,PA宽带计费系统
- Android创建桌面快捷图标
- DB2 WIN7 WIN8在指示的文件系统中找不到数据库目录
- Spring中的创建与销毁
- Signal and Slots
- 4_SSRF
- 【The Time Traveller's Wife】
- mac与windows共享键盘鼠标(synergy)
- Sql server not in优化
- 【AGC013C】Ants on a Circle 弹性碰撞
- kali sudo apt install 无法定位软件包
- 用Redis作Mysql数据库缓存
- numpy random
- elastalert邮件报警
- centos安装dlib
- Spring IOC 容器源码分析
- Donsen法则
- 基于Python的信用评分卡模型分析(一)
- 【BZOJ】【1014】【JLOI2008】火星人prefix
热门文章
- Python开发环境Wing IDE的Blender的Python代码调试技巧
- Java -GUI开发九九乘法表
- [topcoder]TheGridDivTwo
- Maven报错:Missing artifact jdk.tools:jdk.tools:jar:1.6
- webpack了解
- MySQL入门很简单: 7 触发器
- 二维码生成的WEB api方法
- cocos2d-x推断sprite点击
- 快算24点,POJ(3983)
- nbu8.1配置群集SQL Server实例的备份