Skip to content

Commit d405f31

Browse files
committed
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.
1 parent 7c5d292 commit d405f31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/msf/core/exploit/local.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ class Msf::Exploit::Local < Msf::Exploit
1919
def exploit_type
2020
Msf::Exploit::Type::Local
2121
end
22+
23+
def run_simple(opts = {}, &block)
24+
print_warning("test")
25+
raise NotImplementedError, ' - This way of running the local exploit is currently not supported.'
26+
end
2227
end

0 commit comments

Comments
 (0)