
Originally Posted by
g0tmi1k
DO NOT DO THIS..
This is linking the use of a 3rd party application (database) into Metasploit & progresql.
If you are using Kali 2 or kali rolling, use
msfdb init
Code:
[email protected]:~# msfdb init
Creating database user 'msf'
Enter password for new role:
Enter it again:
Creating databases 'msf' and 'msf_test'
Creating configuration file in /usr/share/metasploit-framework/config/database.yml
Creating initial database schema
[email protected]:~#
As you can see - it will create the database file for you
/usr/share/metasploit-framework/config/database.yml
...if something goes wrong, msfdb reinit
I'm facing this problem, and i did all that.. but the connection keep failing..
Code:
[-] 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 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
_---------.
.' ####### ;."
.---,. ;@ @@`; .---,..
." @@@@@'.,'@@ @@@@@',.'@@@@ ".
'[email protected]@@@@@@@@@@@@ @@@@@@@@@@@@@ @;
`[email protected]@@@@@@@@@@@ @@@@@@@@@@@@@@ .'
"--'[email protected]@@ [email protected] @ ,'- .'--"
"[email protected]' ; @ @ `. ;'
|@@@@ @@@ @ .
' @@@ @@ @@ ,
`[email protected]@@@ @@ .
',@@ @ ; _____________
( 3 C ) /|___ / Metasploit! \
;@'. __*__,." \|--- \_____________/
'(.,...."/
Taking notes in notepad? Have Metasploit Pro track & report
your progress and findings -- learn more on http://rapid7.com/metasploit
=[ metasploit v4.11.5-2016010401 ]
+ -- --=[ 1517 exploits - 875 auxiliary - 257 post ]
+ -- --=[ 437 payloads - 37 encoders - 8 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msf > db_status [*] postgresql selected, no connection
:\ tks!!