Hi people,

I'm having issues getting metasploit to work and the fact that noone else has written about this makes me think I'm about to make a fool of myself(!) but .. if anyone could shed some light then it would be appreciated .. if I'm being stupendously dense then flames are ok too

tnx
K

Having read the threads http://www.backtrack-linux.org/forum...t-drivers.html, I expected that I would already be connected to the database but this was not the case:

Code:
msf > db_nmap 192.168.1.1-254 -n -P0
[-] Database not connected
msf >
msf > db_create test
[-] No database driver has been specified

Ok, so then I went to the db_driver:

Code:
msf > db_driver[*] No Active Driver[*]        Available:
[*]     DB Support: Enable the mysql driver with the following command:[*]                 $ gem install mysql[*]     This gem requires mysqlclient headers, which can be installed on Ubuntu with:[*]                 $ sudo apt-get install libmysqlclient-dev
[*]     DB Support: Enable the postgresql driver with the following command:[*]                   * This requires libpq-dev and a build environment[*]                 $ gem install postgres[*]                 $ gem install pg # is an alternative that may work
Fair enough. So then I went to do the postgres install ..

Code:
msf > apt-get install libpq-dev[*] exec: apt-get install libpq-dev
<snip>

Code:
msf > gem install postgres[*] exec: gem install postgres

Building native extensions.  This could take a while...
ERROR:  Error installing postgres:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.2 extconf.rb
extconf.rb:4:in `<main>': uninitialized constant Object::PLATFORM (NameError)


Gem files will remain installed in /var/lib/gems/1.9.2/gems/postgres-0.7.9.2008.01.28 for inspection.
Results logged to /var/lib/gems/1.9.2/gems/postgres-0.7.9.2008.01.28/ext/gem_make.out
msf >
Ok, so I try the pg:

Code:
msf >  gem install pg[*] exec:  gem install pg

Building native extensions.  This could take a while...
Successfully installed pg-0.11.0
1 gem installed
Installing ri documentation for pg-0.11.0...
Installing RDoc documentation for pg-0.11.0...
But:

Code:
msf > db_driver[*] No Active Driver
Things seem ok, process and listening port-wise:

Code:
msf > ps aux | grep postg[*] exec: ps aux | grep postg

postgres  1049  0.0  0.1  40288  3444 ?        S    17:20   0:00 /opt/framework3/postgresql/bin/postgres -D /opt/framework3/postgresql/data
postgres  1090  0.0  0.0  40288  1016 ?        Ss   17:20   0:00 postgres: writer process
postgres  1091  0.0  0.0  40288   784 ?        Ss   17:20   0:00 postgres: wal writer process
postgres  1092  0.0  0.0  40420  1200 ?        Ss   17:20   0:00 postgres: autovacuum launcher process
postgres  1093  0.0  0.0   8592   984 ?        Ss   17:20   0:00 postgres: stats collector process
root      7962  0.0  0.0   4256  1172 pts/0    S+   17:46   0:00 sh -c ps aux | grep postg
root      7965  0.0  0.0   3372   748 pts/0    S+   17:46   0:00 grep postg

msf > netstat -pant | grep -i list[*] exec: netstat -pant | grep -i list

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1178/sshd
tcp        0      0 127.0.0.1:7175          0.0.0.0:*               LISTEN      1049/postgres
tcp        0      0 0.0.0.0:35465           0.0.0.0:*               LISTEN      654/rpc.statd
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      580/portmap
tcp6       0      0 :::22                   :::*                    LISTEN      1178/sshd
tcp6       0      0 ::1:7175                :::*                    LISTEN      1049/postgres