From 84bb81d6ee8a562cb7564634ffc5f2529d886156 Mon Sep 17 00:00:00 2001 From: fyodor Date: Tue, 7 Oct 2008 02:17:08 +0000 Subject: [PATCH] 1-line fix from Jah: The attached fixes an error in ipOps.ip_to_bin() when a string is passed to stdnse.tohex(). This should always be (and should always have been) a number. --- nselib/ipOps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/ipOps.lua b/nselib/ipOps.lua index d9cd6593c..2cbcc30ad 100644 --- a/nselib/ipOps.lua +++ b/nselib/ipOps.lua @@ -387,7 +387,7 @@ ip_to_bin = function( ip ) if not ip:match( ":" ) then -- ipv4 string for octet in string.gfind( ip, "%d+" ) do - t[#t+1] = stdnse.tohex( octet ) + t[#t+1] = stdnse.tohex( tonumber(octet) ) end mask = "00" else