2013-04-01 16:06:40 -05:00
|
|
|
#
|
|
|
|
|
# Specs
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Project
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
require 'metasploit/framework/database'
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
2015-10-16 15:57:04 -05:00
|
|
|
RSpec.describe Msf::DBManager do
|
2013-09-30 13:47:53 -05:00
|
|
|
include_context 'Msf::DBManager'
|
|
|
|
|
|
|
|
|
|
subject do
|
|
|
|
|
db_manager
|
|
|
|
|
end
|
|
|
|
|
|
2014-10-13 14:53:40 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Adapter'
|
2014-10-13 08:40:34 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Client'
|
2014-10-13 12:10:54 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Connection'
|
2014-10-09 11:44:15 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Cred'
|
2014-10-13 09:12:49 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Event'
|
2014-10-13 09:43:40 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::ExploitAttempt'
|
2014-10-09 12:58:30 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::ExploitedHost'
|
2014-10-09 11:16:04 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Host'
|
2014-10-13 10:27:55 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::HostDetail'
|
2014-10-13 11:03:21 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::HostTag'
|
2014-10-09 09:40:11 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::IPAddress'
|
2014-10-09 15:07:17 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Import'
|
2014-10-09 15:21:43 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Loot'
|
2014-10-08 15:30:20 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Migration'
|
2014-10-09 09:14:45 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::ModuleCache'
|
2014-10-09 15:39:55 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Note'
|
2014-10-13 10:12:09 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Ref'
|
2014-10-13 09:24:27 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Report'
|
2014-10-13 11:28:19 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Route'
|
2014-10-09 11:35:07 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Service'
|
2014-10-13 10:52:39 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Session'
|
2014-10-13 11:15:07 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::SessionEvent'
|
2014-10-13 09:32:42 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Task'
|
2014-10-09 15:51:39 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Vuln'
|
2014-10-13 11:34:12 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::VulnAttempt'
|
2014-10-13 09:58:59 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::VulnDetail'
|
2014-10-09 10:49:26 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::WMAP'
|
2014-10-13 12:01:49 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Web'
|
2014-10-08 15:54:29 -05:00
|
|
|
it_should_behave_like 'Msf::DBManager::Workspace'
|
2013-09-30 13:47:53 -05:00
|
|
|
|
2018-04-26 16:01:15 -05:00
|
|
|
# Not implemented in remote data service
|
2018-04-02 08:08:23 -05:00
|
|
|
unless ENV['REMOTE_DB']
|
|
|
|
|
it { is_expected.to respond_to :check }
|
|
|
|
|
it { is_expected.to respond_to :error }
|
|
|
|
|
it { is_expected.to respond_to :service_name_map }
|
|
|
|
|
end
|
|
|
|
|
|
2013-04-01 16:06:40 -05:00
|
|
|
end
|