Skip to content

Instantly share code, notes, and snippets.

@01x01
Created January 31, 2019 12:41
Show Gist options
  • Save 01x01/525d33431ec1f9ac6007e94a40c37e3d to your computer and use it in GitHub Desktop.
Save 01x01/525d33431ec1f9ac6007e94a40c37e3d to your computer and use it in GitHub Desktop.

启动 数据库

service postgresql start

启动Metasploit

msfconsole

初始化 db

msf>> msfdb init

进入数据库

msf>> msfconsole

创建 user

>> createuser msf_user -P 
new password for role: xxxx

创建数据库

>> createdb --owner=msf_user msf_database

退出

>> exit

测试连接

msf>> db_disconnect
msf>> db_connect msf_user:qwe123@127.0.0.1/msf_database

查看状态

msf>> db_status

新建workspace

msf>> workspace -a new_workspace_name

使用nmap

msf>> db_nmap 192.168.31.1/24

查看主机

msf>> hosts

导出数据库文件

msf>> db_export -f xml /root/test.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment