From a2ed5c4a30fa1b7aee1deff84df92ffb69441b74 Mon Sep 17 00:00:00 2001 From: dmiller Date: Sat, 18 Jun 2016 15:49:18 +0000 Subject: [PATCH] Lua strings are 1-indexed. This is not a bug for now, but is incorrect. --- scripts/ssl-date.nse | 2 +- scripts/tls-nextprotoneg.nse | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ssl-date.nse b/scripts/ssl-date.nse index 246b9ea13..cb62c1504 100644 --- a/scripts/ssl-date.nse +++ b/scripts/ssl-date.nse @@ -106,7 +106,7 @@ end -- extract time from ServerHello response local extract_time = function(response) - local i, record = tls.record_read(response, 0) + local i, record = tls.record_read(response, 1) if record == nil then stdnse.debug("Unknown response from server") return nil diff --git a/scripts/tls-nextprotoneg.nse b/scripts/tls-nextprotoneg.nse index 4c1556bc3..d886826aa 100644 --- a/scripts/tls-nextprotoneg.nse +++ b/scripts/tls-nextprotoneg.nse @@ -106,7 +106,7 @@ end --@args response Response to parse. --@return results List of found protocols. local check_npn = function(response) - local i, record = tls.record_read(response, 0) + local i, record = tls.record_read(response, 1) if record == nil then stdnse.debug1("Unknown response from server") return nil