diff --git a/CHANGELOG b/CHANGELOG index 48d32b52d..e5bdef8a0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -83,6 +83,11 @@ o The NSE Comm library now defaults to trying to read as many bytes as are given. Thanks to Brandon for reporting a problem which he noticed in the dns-test-open-recursion script. [Kris] +o Updated zoneTrans.nse to replace length bytes in returned domain names to + periods itself rather than relying on NSE's old behavior of replacing non- + printable characters with periods. Thanks to Rob Nicholls for reporting the + problem. [Kris] + o Changed the order preference of timing ping propes. [Michael] o Enabled nmap to switch between multiple types of timing pings during port diff --git a/scripts/zoneTrans.nse b/scripts/zoneTrans.nse index 9e47e40a5..936954587 100644 --- a/scripts/zoneTrans.nse +++ b/scripts/zoneTrans.nse @@ -100,10 +100,15 @@ function parse_domain(data, offset) end -- RFC 1035 format name - for i=0, x do + for i=0, x-1 do offset = offset + 1 record = record .. string.char(string.byte(data, offset)) end + + offset = offset + 1 + + -- replace length byte with a period + record = record .. '.' x = string.byte(data, offset) ptr = bto16(data, offset)