From c50cedddc9f34d367bc31112f17c405de342e50c Mon Sep 17 00:00:00 2001 From: "sussurro@happypacket.net" Date: Mon, 28 Feb 2011 06:48:59 +0000 Subject: [PATCH] Modified colors for browser matching for Metasploit modules git-svn-id: https://beef.googlecode.com/svn/trunk@777 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- lib/migration.rb | 7 +++++-- lib/modules/msfcommand.rb | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/migration.rb b/lib/migration.rb index eccef8653..60d7440bf 100644 --- a/lib/migration.rb +++ b/lib/migration.rb @@ -57,11 +57,14 @@ class Migration browsers = BeEF::Constants::Browsers::match_browser(msfi['name'] + msfi['targets'].to_json) - targets << {'os_name' => os_name, 'browser_name' => 'ALL', 'verified_status' => 2} if browsers.count == 0 + targets << {'os_name' => os_name, 'browser_name' => 'ALL', 'verified_status' => 3} if browsers.count == 0 browsers.each do |bn| - targets << {'os_name' => os_name, 'browser_name' => bn, 'verified_status' => 2} + targets << {'os_name' => os_name, 'browser_name' => bn, 'verified_status' => 1} end + + targets << {'os_name' => "ALL", 'verified_status' => 0 } + msfci = BeEF::Models::DynamicCommandInfo.new( :name => msfi['name'], diff --git a/lib/modules/msfcommand.rb b/lib/modules/msfcommand.rb index 6800d914c..8c6a5bb04 100644 --- a/lib/modules/msfcommand.rb +++ b/lib/modules/msfcommand.rb @@ -44,11 +44,14 @@ class Msf < BeEF::Command os_name = BeEF::Constants::Os::match_os(st) browsers = BeEF::Constants::Browsers::match_browser(msfi['name'] + msfi['targets'].to_json) - targets << {'os_name' => os_name, 'browser_name' => 'ALL'} if browsers.count == 0 + targets << {'os_name' => os_name, 'browser_name' => 'ALL', 'verified_status' => 3} if browsers.count == 0 + + browsers.each do |bn| + targets << {'os_name' => os_name, 'browser_name' => bn, 'verified_status' => 1} + end + + targets << {'os_name' => "ALL", 'verified_status' => 0 } - browsers.each do |bn| - targets << {'os_name' => os_name, 'browser_name' => bn} - end mod.dynamic_command_info = BeEF::Models::DynamicCommandInfo.new( :name => msfinfo['name'],