Update native DNS spoofer for Dnsruby

Fix methods relating to answer/question data structures which were
set up for Net::DNS objects in the original implementation
utilizing uppercase letters in the exact same method names.

Testing:
  None yet, completely forgot i even wrote this module till i saw
it in my merge conflicts after upstream merged the PR.
MS-2855/keylogger-mettle-extension
RageLtMan 2018-01-31 23:44:51 -05:00
parent beb4d56f7d
commit 812d7ca739
1 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ class MetasploitModule < Msf::Auxiliary
peer = "#{cli.ip_daddr}:" << (cli.is_udp? ? "#{cli.udp_dst}" : "#{cli.tcp_dst}")
# Deal with non DNS traffic
begin
req = Packet.encode_net(data)
req = Packet.encode_drb(data)
rescue => e
print_error("Could not decode payload segment of packet from #{peer}, check log")
dlog e.backtrace
@ -109,7 +109,7 @@ class MetasploitModule < Msf::Auxiliary
answered = []
# Find cached items, remove request from forwarded packet
req.question.each do |ques|
cached = service.cache.find(ques.qName, ques.qType.to_s)
cached = service.cache.find(ques.qname, ques.qtype.to_s)
if cached.empty?
next
else
@ -154,7 +154,7 @@ class MetasploitModule < Msf::Auxiliary
def sent_info(cli,data)
net = Packet.encode_net(data)
peer = "#{cli.ip_daddr}:" << (cli.is_udp? ? "#{cli.udp_dst}" : "#{cli.tcp_dst}")
asked = net.question.map(&:qName).join(', ')
asked = net.question.map(&:qname).join(', ')
vprint_good("Sent packet with header:\n#{cli.inspect}")
vprint_good("Spoofed records for #{asked} to #{peer}")
end