Use Dnsruby::Message for all inputs

This commit is contained in:
Ashley Donaldson 2022-03-15 16:41:05 +11:00
parent 09b094cd64
commit 8cc2b87f59
No known key found for this signature in database
GPG Key ID: 70277622B54D3BCE
1 changed files with 3 additions and 1 deletions

View File

@ -128,7 +128,9 @@ module DNS
when Net::DNS::Packet, Resolv::DNS::Message when Net::DNS::Packet, Resolv::DNS::Message
packet = Rex::Proto::DNS::Packet.encode_drb(argument) packet = Rex::Proto::DNS::Packet.encode_drb(argument)
else else
packet = make_query_packet(argument,type,cls) net_packet = make_query_packet(argument,type,cls)
# This returns a Net::DNS::Packet. Convert to Dnsruby::Message for consistency
packet = Rex::Proto::DNS::Packet.encode_drb(net_packet)
end end
# Store packet_data for performance improvements, # Store packet_data for performance improvements,