Metasploit mailing list archives

db_sqlite3 error


From: version5 at gmail.com (nnp)
Date: Sun, 22 Jun 2008 11:36:16 +0100

Hi guys,

Hopefully this won't arrive twice, I think I sent it to the wrong
address first time around :)

Anyways, I'm trying to use the db_sqlite3 module. load db_sqlite3
executes fine, as does db_create tablename but when I attempt to load
the results of a previous nmap scan or to use the nmap wrapper I get
the following error:

msf > load db_sqlite3
[*] Successfully loaded plugin: db_sqlite3
msf > db_create test
[*] Creating a new database instance...
[*] Successfully connected to the database
[*] File: test
msf > db_import_nmap_xml test.xml
[-] Error while running command db_import_nmap_xml: Could not find table 'hosts'

Call stack:
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in
`table_structure'
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/object/misc.rb:28:in
`returning'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in
`table_structure'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb:189:in
`columns'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1145:in
`columns'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2598:in
`attributes_from_column_definition_without_lock'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/locking/optimistic.rb:55:in
`attributes_from_column_definition'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2126:in
`initialize'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:638:in `new'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:638:in
`create'
./lib/msf/core/db.rb:221:in `get_host'
./lib/msf/ui/console/command_dispatcher/db.rb:452:in `load_nmap_xml'
/usr/lib/ruby/1.8/rexml/element.rb:939:in `each'
/usr/lib/ruby/1.8/rexml/xpath.rb:53:in `each'
/usr/lib/ruby/1.8/rexml/element.rb:939:in `each'
./lib/msf/ui/console/command_dispatcher/db.rb:438:in `load_nmap_xml'
/usr/lib/ruby/1.8/rexml/element.rb:939:in `each'
/usr/lib/ruby/1.8/rexml/xpath.rb:53:in `each'
/usr/lib/ruby/1.8/rexml/element.rb:939:in `each'
./lib/msf/ui/console/command_dispatcher/db.rb:436:in `load_nmap_xml'
./lib/msf/ui/console/command_dispatcher/db.rb:388:in `cmd_db_import_nmap_xml'
./lib/rex/ui/text/dispatcher_shell.rb:234:in `send'
./lib/rex/ui/text/dispatcher_shell.rb:234:in `run_command'
./lib/rex/ui/text/dispatcher_shell.rb:196:in `run_single'
./lib/rex/ui/text/dispatcher_shell.rb:191:in `each'
./lib/rex/ui/text/dispatcher_shell.rb:191:in `run_single'
./lib/rex/ui/text/shell.rb:125:in `run'
./msfconsole:78

The same error occurs using db_nmap. The arguments being passed to
nmap are '-sV -p21-25,80,110,143 TARGET' and the host is up and has
some of those ports open. Has anyone had a similar issue with the
db_sqlite3 module or am I doing something silly?

Cheers,
nnp


-- 
http://www.smashthestack.org
http://www.unprotectedhex.com



Current thread: