Jump to content


Photo
- - - - -

Metasploit Database Problems


  • Please log in to reply
1 reply to this topic

#1 ckcrown

ckcrown

    Will I break 10 posts?

  • Members
  • 3 posts
  • Gender:Male
  • Location:Ohio

Posted 28 November 2010 - 12:38 PM

I am trying to import a Database into Metasploit (using the console).
When I try I utilize this command and get the following error.



msf > db_connect c:\frameworks\jaimi.xml
[-] Error while running command db_connect: Failed to connect to the database: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?


Call stack:
C:/frameworks/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1876:in `db_connect_postgresql'
C:/frameworks/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1542:in `cmd_db_connect'
C:/frameworks/msf3/lib/rex/ui/text/dispatcher_shell.rb:246:in `run_command'
C:/frameworks/msf3/lib/rex/ui/text/dispatcher_shell.rb:208:in `block in run_single'
C:/frameworks/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `each'
C:/frameworks/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `run_single'
C:/frameworks/msf3/lib/rex/ui/text/shell.rb:143:in `run'
msfconsole:124:in `<main>'
msf >


I am not sure what I am doing wrong. I have searched old forum posts and online tutorials. Everything I have found either has not been helpful or utilizes old commands, e.g. db_create

If anyone can help me I will be reading this posts and I will be on AIM. My screen is: Aohos2

Thank You,

#2 d3xt3r

d3xt3r

    SCRiPT KiDDie

  • Members
  • 20 posts
  • Gender:Male

Posted 15 January 2011 - 10:54 PM

I am trying to import a Database into Metasploit (using the console).
When I try I utilize this command and get the following error.



msf > db_connect c:\frameworks\jaimi.xml
[-] Error while running command db_connect: Failed to connect to the database: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?


Call stack:
C:/frameworks/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1876:in `db_connect_postgresql'
C:/frameworks/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1542:in `cmd_db_connect'
C:/frameworks/msf3/lib/rex/ui/text/dispatcher_shell.rb:246:in `run_command'
C:/frameworks/msf3/lib/rex/ui/text/dispatcher_shell.rb:208:in `block in run_single'
C:/frameworks/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `each'
C:/frameworks/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `run_single'
C:/frameworks/msf3/lib/rex/ui/text/shell.rb:143:in `run'
msfconsole:124:in `<main>'
msf >


I am not sure what I am doing wrong. I have searched old forum posts and online tutorials. Everything I have found either has not been helpful or utilizes old commands, e.g. db_create

If anyone can help me I will be reading this posts and I will be on AIM. My screen is: Aohos2

Thank You,





Well !! I had a similar problem too....this is how it worked for me.When you start the msfconole issue commands in this order

msf > db_driver sqlite3
[*] Using database driver sqlite3
msf >db_import_nmap_xml c:\frameworks\jaimi.xml


I see that you are using the windows ( C:\frameworks\jaimi.xml). But i am working on Linux, so let me know if this helped you.

Edited by d3xt3r, 15 January 2011 - 10:55 PM.





BinRev is hosted by the great people at Lunarpages!