From 85c40a122a5b41440481d55340ec7d88c40bc910 Mon Sep 17 00:00:00 2001 From: Green-m Date: Tue, 18 Sep 2018 18:49:56 +0800 Subject: [PATCH] Fix crash issue when auto complete the session option. --- lib/msf/ui/console/command_dispatcher/core.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index 499f8d9e55..a0bb73c063 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -2225,7 +2225,9 @@ class Core # Provide valid session options for the current post-exploit module # def option_values_sessions - active_module.compatible_sessions.map { |sid| sid.to_s } + if active_module.respond_to?(:compatible_sessions) + active_module.compatible_sessions.map { |sid| sid.to_s } + end end #