PacketFu::UDPPacket to Net::DNS::Packet Conversion Error

My problem is with the snippet below. The output of the 'puts' command
is UDPPacket:53, which means the packets I am trying to convert must be
DNS packets. Based on the documentation of these classes, I believed
that udp_header.body would give me the DNS packet (header+questions)
which could be fed into Net::Packet.parse, however I receive various
errors which all cite "Malformed packet". The network traffic is
normal, thus I have no reason to believe these packets are actually
malformed, so I must be converting them improperly. Any help is

udpReq = PacketFu::Packet.parse(dnsRequest)
puts ( + ":" + udpReq.udp_dst)
payload = udpReq.udp_header.body
request = Net::DNS::Packet.parse(payload)


Posted via