When most people first use metasploit search tool module will see in kali "There is no connection to the database, use slow search," which for people with obsessive-compulsive disorder who can not let him exist ah. Initially I have encountered, go to Baidu, we found many ways to process people without dizziness, operations meal not effective.
In fact, the main problem is not to create a database when first-time users, do not have this database.yml you will not even have to ah. So we need to create a can Baidu to create their own methods, but it is not convenient (personally think), I recommended two simple ways:
method one:
The first step of course is to start postgresql database services. (Residues wrong hands before sorry)
service postgresql start
The second step, initialization msf database automatically generates a file database.yml in / usr / share / metasploit-framework / config
msfdb init
This process will let you enter a password, and a little fast, which can be ignored, it will automatically generate a password for you.
After the two-stage performer, open msf, see db_status, you can already see such a news:
[*]postgresql connected to msf
Method Two:
In fact, with a method of the same principle, but changed manually, and initially had two such .yml files in / usr / share / metasploit-framework / config: database.yml.example and database.yml.travis, in the database. yml.example there will be some key fields such as
adapter:
database:
username:
password: ______________________________ (empty)
This is actually just like its name suffix, is a sample database file, a detailed description database.yml.travis document, the words that you want to customize a database file can be executed
cp config/database.yml.example config/database.yml
(Specific form depending on your current position), is to copy the contents of database.yml.example in database.yml, and then change the password yourself.
Note: The next time you start the system is also first open service postgresql start metasploit will be automatically connected
to sum up:
The principle is called the second method requires a database.yml file, a specific operation or recommended method.