Merge pull request #5887 from farias-r7/bug/MSP-13104/create-match-result-on-session-failure-exploit-button

Create MatchResult with status Failure on session failure #land MSP-13104
bug/bundler_fix
Greg Mikeska 2015-08-24 14:57:48 -05:00
commit 4af86f210c
2 changed files with 9 additions and 1 deletions

View File

@ -96,7 +96,7 @@ module Msf::DBManager::Session
MetasploitDataModels::AutomaticExploitation::MatchResult.create!(
match: session.exploit.user_data[:match],
run: session.exploit.user_data[:run],
state: 'succeeded',
state: MetasploitDataModels::AutomaticExploitation::MatchResult::SUCCEEDED,
)
infer_vuln_from_session(session, wspace)
elsif session.via_exploit

View File

@ -1285,6 +1285,14 @@ class Exploit < Msf::Module
end
end
if user_data_is_match?
MetasploitDataModels::AutomaticExploitation::MatchResult.create!(
match: user_data[:match],
run: user_data[:run],
state: MetasploitDataModels::AutomaticExploitation::MatchResult::FAILED,
)
end
framework.db.report_exploit_failure(info)
end