From a362d8b9c8f8b80aa391eae9bd0799bfc7998bca Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 6 Jul 2016 15:53:06 -0500 Subject: [PATCH] update payload test generator to work with MetasploitModules --- tools/modules/missing_payload_tests.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/modules/missing_payload_tests.rb b/tools/modules/missing_payload_tests.rb index 7e8c427741..203f9dae2d 100755 --- a/tools/modules/missing_payload_tests.rb +++ b/tools/modules/missing_payload_tests.rb @@ -28,7 +28,7 @@ framework.payloads.each { |reference_name, payload_class| } ancestor_reference_names = module_ancestors.map { |module_ancestor| unpacked_module_ancestor_full_name = module_ancestor.name.sub(/^Msf::Modules::Mod/, '') - .sub(/::Metasploit\d+/, '') + .sub(/::MetasploitModule/, '') module_ancestor_full_name = [unpacked_module_ancestor_full_name].pack("H*") module_ancestor_full_name.sub(%r{^payload/}, '') } @@ -59,21 +59,21 @@ File.open('log/untested-payloads.log') { |f| unless tested_options.include? options reference_name = options[:reference_name] - $stderr.puts - $stderr.puts " context '#{reference_name}' do\n" \ + $stdout.puts + $stdout.puts " context '#{reference_name}' do\n" \ " it_should_behave_like 'payload cached size is consistent',\n" \ " ancestor_reference_names: [" ancestor_reference_names = options[:ancestor_reference_names] if ancestor_reference_names.length == 1 - $stderr.puts " '#{ancestor_reference_names[0]}'" + $stdout.puts " '#{ancestor_reference_names[0]}'" else - $stderr.puts " '#{ancestor_reference_names[1]}'," - $stderr.puts " '#{ancestor_reference_names[0]}'" + $stdout.puts " '#{ancestor_reference_names[1]}'," + $stdout.puts " '#{ancestor_reference_names[0]}'" end - $stderr.puts " ],\n" \ + $stdout.puts " ],\n" \ " dynamic_size: false,\n" \ " modules_pathname: modules_pathname,\n" \ " reference_name: '#{reference_name}'\n" \