From d405f31c355995c13ba543968460e8239ccf33ee Mon Sep 17 00:00:00 2001 From: wchen-r7 Date: Thu, 19 Nov 2015 14:31:31 -0600 Subject: [PATCH 1/2] Add a NotImplementedError if run is used to run a local exploit Running a local exploit like a post is not currently supported, we should at least raise a warning or something, and not just let it backtrace and confuse the user. --- lib/msf/core/exploit/local.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/msf/core/exploit/local.rb b/lib/msf/core/exploit/local.rb index bb06219202..dcddfa8e04 100644 --- a/lib/msf/core/exploit/local.rb +++ b/lib/msf/core/exploit/local.rb @@ -19,4 +19,9 @@ class Msf::Exploit::Local < Msf::Exploit def exploit_type Msf::Exploit::Type::Local end + + def run_simple(opts = {}, &block) + print_warning("test") + raise NotImplementedError, ' - This way of running the local exploit is currently not supported.' + end end From b636aeb3035874cf4d7feffda85e637787c819b9 Mon Sep 17 00:00:00 2001 From: wchen-r7 Date: Fri, 20 Nov 2015 19:38:33 -0600 Subject: [PATCH 2/2] rm print_warning --- lib/msf/core/exploit/local.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/msf/core/exploit/local.rb b/lib/msf/core/exploit/local.rb index dcddfa8e04..d9d8f510ab 100644 --- a/lib/msf/core/exploit/local.rb +++ b/lib/msf/core/exploit/local.rb @@ -21,7 +21,6 @@ class Msf::Exploit::Local < Msf::Exploit end def run_simple(opts = {}, &block) - print_warning("test") raise NotImplementedError, ' - This way of running the local exploit is currently not supported.' end end