Land #5873, report_note for local_exploit_suggester
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
include Msf::Auxiliary::Report
|
||||
|
||||
class Metasploit3 < Msf::Post
|
||||
|
||||
def initialize(info={})
|
||||
@@ -137,7 +139,7 @@ class Metasploit3 < Msf::Post
|
||||
end
|
||||
|
||||
show_found_exploits
|
||||
|
||||
results = []
|
||||
@local_exploits.each do |m|
|
||||
begin
|
||||
checkcode = m.check
|
||||
@@ -145,6 +147,7 @@ class Metasploit3 < Msf::Post
|
||||
if is_check_interesting?(checkcode)
|
||||
# Prints the full name and the checkcode message for the exploit
|
||||
print_good("#{m.fullname}: #{checkcode.second}")
|
||||
results << [m.fullname, checkcode.second]
|
||||
# If the datastore option is true, a detailed description will show
|
||||
if datastore['SHOWDESCRIPTION']
|
||||
# Formatting for the description text
|
||||
@@ -159,9 +162,13 @@ class Metasploit3 < Msf::Post
|
||||
vprint_error("#{e.class} #{m.shortname} failled to run: #{e.message}")
|
||||
end
|
||||
end
|
||||
report_note(
|
||||
:host => rhost,
|
||||
:type => "les_results",
|
||||
:data => results.inspect
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
def is_check_interesting?(checkcode)
|
||||
[
|
||||
Msf::Exploit::CheckCode::Vulnerable,
|
||||
|
||||
Reference in New Issue
Block a user