From 14bd4e789940d6d7d0d8bd72521448315e8a2c90 Mon Sep 17 00:00:00 2001 From: dmiller Date: Fri, 10 Mar 2017 17:29:52 +0000 Subject: [PATCH] Use stdnse.fromhex in ssl-dh-params --- scripts/ssl-dh-params.nse | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/ssl-dh-params.nse b/scripts/ssl-dh-params.nse index 58cf829b8..477981c31 100644 --- a/scripts/ssl-dh-params.nse +++ b/scripts/ssl-dh-params.nse @@ -114,14 +114,7 @@ local DHE_ALGORITHMS_EXPORT = { ["DHE_DSS_EXPORT1024"] = 1 } --- Helper function to convert hex string to byte array -local function fromhex(hexstr) - return string.gsub(hexstr, "%s*(%x%x)%s*", - function(c) - return string.char(tonumber(c, 16)) - end - ) -end +local fromhex = stdnse.fromhex -- Common Diffie-Hellman groups --