Fix an exception when the cached entry is a non-A, better descriptions for the timing detection

git-svn-id: file:///home/svn/framework3/trunk@5607 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-07-28 05:05:04 +00:00
parent ee0f6ed5cc
commit f589f5cdb8
2 changed files with 10 additions and 8 deletions

View File

@ -276,7 +276,7 @@ class Auxiliary::Spoof::Dns::BailiWickedDomain < Msf::Auxiliary
disconnect_ip
return
end
print_status("Sending #{numxids} spoofed replies for each query")
print_status("Sending #{numxids} spoofed replies from each nameserver (#{barbs.length}) for each query")
end
# Flood the target with queries and spoofed responses, one will eventually hit
@ -355,7 +355,7 @@ class Auxiliary::Spoof::Dns::BailiWickedDomain < Msf::Auxiliary
disconnect_ip
return
end
print_status("Now sending #{numxids} spoofed replies for each query")
print_status("Now sending #{numxids} spoofed replies from each nameserver (#{barbs.length}) for each query")
end
end

View File

@ -204,9 +204,10 @@ class Auxiliary::Spoof::Dns::BailiWickedHost < Msf::Auxiliary
if answer and answer.length > 0
answer = Resolv::DNS::Message.decode(answer)
answer.each_answer do |name, ttl, data|
if((name.to_s + ".") == hostname and data.address.to_s == address)
if((name.to_s + ".") == hostname)
t = Time.now + ttl
print_status("Failure: This hostname is already in the target cache: #{name} == #{address}")
print_status("Failure: This hostname is already in the target cache: #{name}")
print_status(" Cache entry expires on #{t.to_s}... sleeping.")
cached = true
sleep ttl
@ -269,7 +270,7 @@ class Auxiliary::Spoof::Dns::BailiWickedHost < Msf::Auxiliary
disconnect_ip
return
end
print_status("Sending #{numxids} spoofed replies for each query")
print_status("Sending #{numxids} spoofed replies from each nameserver (#{barbs.length}) for each query")
end
# Flood the target with queries and spoofed responses, one will eventually hit
@ -348,7 +349,7 @@ class Auxiliary::Spoof::Dns::BailiWickedHost < Msf::Auxiliary
disconnect_ip
return
end
print_status("Now sending #{numxids} spoofed replies for each query")
print_status("Now sending #{numxids} spoofed replies from each nameserver (#{barbs.length}) for each query")
end
end
@ -365,8 +366,9 @@ class Auxiliary::Spoof::Dns::BailiWickedHost < Msf::Auxiliary
if answer and answer.length > 0
answer = Resolv::DNS::Message.decode(answer)
answer.each_answer do |name, ttl, data|
if((name.to_s + ".") == hostname and data.address.to_s == address)
if((name.to_s + ".") == hostname)
print_status("Poisoning successful after #{queries} queries and #{responses} responses: #{name} == #{address}")
print_status("TTL: #{ttl} DATA: #{data.to_s}")
disconnect_ip
return
end