Kali2017 Metasploit connecting PostgreSQL database

Source: Internet
Author: User
Tags postgresql

msfdb: MSF Database Administration commands

1. View the MSF database connection status

MSF > db_status[*] PostgreSQL selected, no connection//not connected

2. Msfdb command

MSF > msfdb//msfdb can be used directly at the command line using the [*] exec:msfdbmanage a Metasploit framework database  Msfdb init
    
     # Initialize the database//Initialize databases  msfdb reinit  # Delete and reinitialize the database//empty config to reinitialize the databases 
     msfdb Delete  # Delete database and stop using it//delete databases and stop use  msfdb start   # Start the The database/ /Start Database  msfdb Stop    # Stop the database//Stop
    

3. Initialize the database

MSF > msfdb init[*'MSF ' ' msf_test '  file in/usr/share/metasploit-framework/config/database.ymlcreating initial Database schema

4. View the MSF database configuration file

[Email protected]:~#Cat /usr/share/metasploit-framework/config/ database.ymldevelopment:adapter:postgresql database:msf username:msf password:eusdzzkrsyxvmwmpi+dz2kf1rojkkeekqnrvnbv7ldy=host:localhost Port:5432Pool:5Timeout:5production:adapter:postgresql database:msf username:msf password:eusdzzkrsyxvmwmpi+dz2kf1rojkkeekqnrvnbv7ldy=host:localhost Port:5432Pool:5Timeout:5test:adapter:postgresql database:msf_test username:msf password:eusdzzkrsyxvmwmpi+dz2kf1rojkkeekqnrvnbv7ldy=host:localhost Port:5432Pool:5Timeout:5

5. Start or restart MSF

[Email protected]:~# msfconsole ______________________________ ________________________________________________|                          || 3Kom superhack II Logon | |                                                                              ______________________________________________________________________________||                                                                              ||                                                                              ||                 ||                                                                              User Name: [Security] | |                 ||                                                                              Password: [] | |                                                                              ||                                                                              ||                                   || [OK ]                                     ||                                                                              ______________________________________________________________________________||                                                       || Https//metasploit.com ||______________________________________________________________________________| =[Metasploit v4.15.5-Dev]+ -- --=[1673Exploits-959Auxiliary-294post]+ -- --=[489Payloads- +Encoders-9Nops]+----=[free Metasploit Pro trial:http://R-7.co/trymsp]MSF>db_status[*] PostgreSQL connected to MSF

Kali2017 Metasploit connecting PostgreSQL database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.