1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 13:49:03 +00:00

Remove bin.lua calls from some scripts and libraries

This commit is contained in:
dmiller
2018-08-29 03:06:40 +00:00
parent dc996da218
commit 0d18bcdbc2
17 changed files with 65 additions and 67 deletions

View File

@@ -32,7 +32,6 @@
-- @copyright Same as Nmap--See https://nmap.org/book/man-legal.html
--
local bin = require "bin"
local nmap = require "nmap"
local stdnse = require "stdnse"
local table = require "table"
@@ -96,7 +95,7 @@ Util = {
--
-- @return uuid string containing a uuid
generateUUID = function()
local rnd_bytes = select(2, bin.unpack( "H16", openssl.rand_bytes( 16 ) ) ):lower()
local rnd_bytes = stdnse.tohex(openssl.rand_bytes(16)):lower()
return ("%s-%s-%s-%s-%s"):format( rnd_bytes:sub(1, 8),
rnd_bytes:sub(9, 12), rnd_bytes:sub( 13, 16 ), rnd_bytes:sub( 17, 20 ),