Metasploit
Start Required Services
Metasploit uses PostgreSQL as its database so it needs to be launched first.
$ sudo service postgresql startInitialise the Metasploit PostgreSQL Database
With PostgreSQL up and running, we next need to create and initialize the msf database.
$ sudo msfdb initLaunch msfconsole in Kali
$ sudo msfconsole
msf > db_status
[*] postgresql connected to msf3Connect MSF to the database if needed
db_connect -y /usr/share/metasploit-framework/config/database.ymlFix Metasploit Cache Issue
msf > search wordpress
[!] Database not connected or cache not built, using slow search
# Rebuid Cache
# It takes some time for the cache to be rebuild
msf> db_rebuild_cacheSet RHOSTS from msfconsole search
Set RHOSTS globally
Export Database
Disable hierarchical search
If you have found that Metasploit does this:

Then run the below to turn it off. dont forget to run the 'save' command after if you want it persistant on next boot.

Last updated