Skip to main content
Skip table of contents

Display Hex Dump for DNS Traffic

This function displays a Wireshark-style Hex Dump for all DNS traffic.

function DnsHexDump (msg, packet)

  require 'HexString'
  require 'LOG'


  if packet ~= nil and GetLatestApplication(msg) == "dns" then
    if GetPacketLength(packet) > 0 then
      local packetString = GetPacketString(packet)
      local packetHexDump = HexDump(packetString)
      EZINFO('DNS Packet\n', GetUuid(msg), "\n", packetHexDump)
    end
  end
end
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.