Do not reply to non TXT records for now

git-svn-id: file:///home/svn/framework3/trunk@5599 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2008-07-26 02:53:49 +00:00
parent 30e29858a2
commit 067d19051e
1 changed files with 3 additions and 1 deletions

View File

@ -72,6 +72,7 @@ class Auxiliary::Server::Dns::SpoofHelper < Msf::Auxiliary
begin
name = ''
while @run
reply = false
packet, addr = @sock.recvfrom(65535)
if (packet.length == 0)
break
@ -90,10 +91,11 @@ class Auxiliary::Server::Dns::SpoofHelper < Msf::Auxiliary
print_status("DNS #{addr[3]}:#{addr[1]} XID #{request.id} #{name}")
answer = Resolv::DNS::Resource::IN::TXT.new("#{addr[3]}:#{addr[1]} #{name}")
request.add_answer(name, 1, answer)
reply = true
end
}
@sock.send(request.encode(), 0, addr[3], addr[1])
@sock.send(request.encode(), 0, addr[3], addr[1]) if reply
end
# Make sure the socket gets closed on exit