mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 21:21:31 +00:00
SSL overhaul fixing OpenSSL related problems when SSL has not been compiled in
* replace require function calls with stndse.silent_require * fixed a bug in nse_main that would fail creating scripts.db when a script fails to load * reworked some code to provide limited functionality even though SSL is not present
This commit is contained in:
@@ -3,7 +3,6 @@ local bin = require "bin"
|
||||
local datafiles = require "datafiles"
|
||||
local http = require "http"
|
||||
local nmap = require "nmap"
|
||||
local openssl = require "openssl"
|
||||
local os = require "os"
|
||||
local shortport = require "shortport"
|
||||
local stdnse = require "stdnse"
|
||||
@@ -158,7 +157,8 @@ end
|
||||
|
||||
function randomstring()
|
||||
local rnd, s, l, _
|
||||
if pcall(require, "openssl") then
|
||||
local status, openssl = pcall(require, "openssl")
|
||||
if status then
|
||||
rnd = openssl.rand_pseudo_bytes
|
||||
end
|
||||
s = rnd and rnd(8) or tostring( os.time() )
|
||||
|
||||
Reference in New Issue
Block a user