如有如下报错:
Failed to connect to the database: FATAL: password authentication failed for user "msf"
FATAL: password authentication failed for user "msf"
或者
Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5433?
在/usr/share/metasploit-framework/config
目录中运行以下指令:
root@kali:/usr/share/metasploit-framework/config# msfdb reinit
root@kali:/usr/share/metasploit-framework/config# cp database.yml /root/.msf4/
root@kali:/usr/share/metasploit-framework/config# service postgresql restart
root@kali:/usr/share/metasploit-framework/config# msfconsole
即可
出现
Module database cache not built yet, using slow search
msfdb init
msf > db_rebuild_cache
即可
网友评论