diff --git a/lib/msf/core/post/windows/registry.rb b/lib/msf/core/post/windows/registry.rb index b66b05a6dd..dacf4a62e6 100644 --- a/lib/msf/core/post/windows/registry.rb +++ b/lib/msf/core/post/windows/registry.rb @@ -108,7 +108,11 @@ protected # Determines whether the session can use meterpreter registry methods # def session_has_registry_ext? - (session.sys and session.sys.respond_to?(:registry)) + begin + return !!(session.sys and session.sys.registry) + rescue NoMethodError + return false + end end