From 21ed434f24d008de817501e42829ef831ebe185a Mon Sep 17 00:00:00 2001 From: James Lee Date: Thu, 24 Feb 2011 19:36:22 +0000 Subject: [PATCH] better test for registry extension git-svn-id: file:///home/svn/framework3/trunk@11819 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/post/windows/registry.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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