diff --git a/nselib/wsdd.lua b/nselib/wsdd.lua index bcf1ed5fc..d3265edfa 100644 --- a/nselib/wsdd.lua +++ b/nselib/wsdd.lua @@ -34,9 +34,14 @@ module(... or "wsdd", package.seeall) -require 'openssl' require 'target' +local HAVE_SSL = false + +if pcall(require,'openssl') then + HAVE_SSL = true +end + -- The different probes local probes = { @@ -332,6 +337,8 @@ Helper = { -- @return matches table containing responses, suitable for printing using -- the stdnse.format_output function discoverServices = function( self, probename ) + if ( not(HAVE_SSL) ) then return false, "The wsdd library requires OpenSSL" end + local comm = Comm:new(self.host, self.port, self.mcast) local probe = Util.getProbeByName(probename) comm:setProbe( probe ) diff --git a/scripts/ssh-hostkey.nse b/scripts/ssh-hostkey.nse index 187f9af5c..ba859fe69 100644 --- a/scripts/ssh-hostkey.nse +++ b/scripts/ssh-hostkey.nse @@ -51,7 +51,7 @@ else portrule = function() return false end action = function() end stdnse.print_debug( 3, "Skipping %s script because OpenSSL is missing.", - SCRIPT_NAME) + filename) return; end