From 0f28f2818b1998e9c5ae94ac31404104bfca5430 Mon Sep 17 00:00:00 2001 From: batrick Date: Thu, 20 Nov 2008 20:30:43 +0000 Subject: [PATCH] Fixed host.os table to be a 1 based array rather than 0 based. --- CHANGELOG | 2 ++ nse_nmaplib.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index c02f5b784..cff82e8b7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ # Nmap Changelog ($Id$); -*-text-*- +o [NSE] host.os table is now properly a 1 based array (was 0). [Patrick] + o [Zenmap] Zenmap now parses and records XSL stylesheet information from Nmap XML files, so files saved by Zenmap will be viewable in a web browser just like those produced by Nmap. [David] diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index 6c06929fd..24fb127b0 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -334,7 +334,7 @@ void set_hostinfo(lua_State *L, Target *currenths) { // this will run at least one time and at most 8 times, see if condition for(i = 0; FPR->accuracy[i] == 1; i++) { lua_pushstring(L, FPR->prints[i]->OS_name); - lua_rawseti(L, -2, i); + lua_rawseti(L, -2, i+1); } lua_setfield(L, -2, "os"); }