mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
revert tonumber() conversion in stdnse.tohex() because tonumber() discards whitespace
This commit is contained in:
parent
840b276b6c
commit
8f83450228
1 changed files with 1 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ function tohex( s, options )
|
|||
local separator = options.separator
|
||||
local hex
|
||||
|
||||
if tonumber( s ) then
|
||||
if type( s ) == "number" then
|
||||
hex = ("%x"):format(s)
|
||||
elseif type( s ) == 'string' then
|
||||
hex = ("%02x"):rep(#s):format(s:byte(1,#s))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue