From 9e19121858c6ce9a0b1195786ff30d08cbd97ab7 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Fri, 2 Oct 2009 14:24:10 +0000 Subject: [PATCH] Print an error if openssl is not installed, this is a workaround until we have a better way to show how missing optional dependencies affect the feature set. git-svn-id: file:///home/svn/framework3/trunk@7116 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/sanity.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/msf/sanity.rb b/lib/msf/sanity.rb index c197d702fa..9f457ceab7 100644 --- a/lib/msf/sanity.rb +++ b/lib/msf/sanity.rb @@ -45,6 +45,14 @@ if(RUBY_PLATFORM == 'java') end end +# Check for OpenSSL and print a warning if it is not installed +begin + require 'openssl' +rescue ::LoadError + $stderr.puts "*** The ruby-openssl library is not installed, many features will be disabled!" + $stderr.puts "*** Examples: Meterpreter, SSL Sockets, SMB/NTLM Authentication, and more" +end + # # Check for the ugly 1.8.7 short-named constants bug