1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 09:59:04 +00:00

Remove some openssl deps when only used for random strings

This commit is contained in:
dmiller
2018-09-08 17:07:07 +00:00
parent 26ef852a28
commit e1cbd13f82
3 changed files with 8 additions and 10 deletions

View File

@@ -4,8 +4,7 @@ local nmap = require "nmap"
local packet = require "packet"
local stdnse = require "stdnse"
local string = require "string"
local openssl = stdnse.silent_require "openssl"
local rand = require "rand"
description = [[
Obtains hostnames, IPv4 and IPv6 addresses through IPv6 Node Information Queries.
@@ -69,7 +68,7 @@ local QTYPE_STRINGS = {
local function build_ni_query(src, dst, qtype)
local flags
local nonce = openssl.rand_pseudo_bytes(8)
local nonce = rand.random_string(8)
if qtype == QTYPE_NODENAME then
flags = 0x0000
elseif qtype == QTYPE_NODEADDRESSES then