From 7e559f7b13e21c062ded4050866d3eecd7085ac9 Mon Sep 17 00:00:00 2001 From: James Lee Date: Tue, 31 Mar 2015 10:16:14 -0500 Subject: [PATCH] Don't modify argument in place --- lib/msf/core/db_manager/exploit_attempt.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/db_manager/exploit_attempt.rb b/lib/msf/core/db_manager/exploit_attempt.rb index daa0c89365..c11df2279e 100644 --- a/lib/msf/core/db_manager/exploit_attempt.rb +++ b/lib/msf/core/db_manager/exploit_attempt.rb @@ -43,8 +43,7 @@ module Msf::DBManager::ExploitAttempt # Look up the service as appropriate if port and svc.nil? - opts[:proto] ||= prot - svc = opts[:service] = get_service(wspace, host, prot, port) + svc = get_service(wspace, host, prot, port) end # Look up the host as appropriate @@ -58,6 +57,9 @@ module Msf::DBManager::ExploitAttempt # Bail if we dont have a host object return if not host + + opts = opts.dup + opts[:service] = svc opts[:host] = host do_report_failure_or_success(opts)