Metasploit connecting the PostgreSQL database:
1. Turn on the PostgreSQL service: Services PostgreSQL start
2. Enter PostgreSQL, set the default user password, create a new user, set new user permissions, create a database:
Sudo-u postgres psql# access to PostgreSQL Default user
Alter user postgres with password ' password '; #设置默认用户的登录密码
Create user ' username ' wiht password ' password ' nocreatedb; #创建带密码的新用户
Create database name ' with owner = ' user name '; #创建数据库并指定数据库的所属用户
\q
3. Enter Metasploit and connect to the database:
Msfconsole
db_status# viewing the status of a database
Db_connect User name: password @ host address \ Database name
db_status# Check to see if the switch is successful
Why Connect to PostgreSQL?
The speed of searching for modules in MSF after connecting to a database can be greatly improved;
After you connect to the database, traces of MSF are saved for easy export to write penetration test reports
This article is from the "Execute" blog, so be sure to keep this source http://executer.blog.51cto.com/10404661/1959903
Metasploit Connecting the PostgreSQL database