1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-05 22:19:03 +00:00

Change ssl scripts to use string unpacking instead of bin.lua

This commit is contained in:
dmiller
2017-03-10 17:29:53 +00:00
parent 14bd4e7899
commit eff6c09118
3 changed files with 11 additions and 12 deletions

View File

@@ -2,9 +2,9 @@ local io = require "io"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local sslcert = require "sslcert"
local tls = require "tls"
local bin = require "bin"
-- -*- mode: lua -*-
-- vim: set filetype=lua :
@@ -82,7 +82,7 @@ local get_fingerprints = function(path)
section = line
elseif section ~= nil then
-- Add fingerprint to section.
local fingerprint = bin.pack("H", line)
local fingerprint = stdnse.fromhex(line)
if #fingerprint == 20 then
fingerprints[fingerprint] = section
stdnse.debug4("Added key %s to database.", line)