2014年10月4日 星期六

[ Metasploit 常見問題 ] Database not connected or cache not built in Metasploit console

Source From Here 
Preface 
When you start msfconsole: 
# msfconsole
[-] Fail to connect to the database...

Or you try to search in msfconsole: 
msf > search oracle
[!] Database not connected or cache not built, using slow search

Then you try to check with command db_status
msf > db_status
[*] postgresql selected, no connection

Then you can refer to blow on how to solve this issue. 

Solution 
In Kali, you will need to start up the postgresql server before using the database. 
root@kali:~# service postgresql start
[ ok ] Starting PostgreSQL 9.1 database server: main.

Once you start the metasploit service it will create a msf3 datauser user and database called msf3. 
root@kali:~# service metasploit start
Configuring Metasploit...
Creating metasploit database user 'msf3'...
Creating metasploit database 'msf3'...
...

When we load up msfconsole, and run "db_status", we can confirm that Metasploit is successfully connected to the database. 
msf > db_status 
[*] postgresql connected to msf3

To build/rebuild metasploit cache use db_rebuild_cache command: 
msf > db_rebuild_cache # It takes some time for the cache to be rebuild so be patient.


Supplement 
Metasploit unleashed - Using the Database 
Fix metasploit “Database not connected or cache not built”

沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...