Changeset 5581
- Timestamp:
- 07/23/08 16:40:58 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
framework3/trunk/modules/auxiliary/spoof/dns/baliwicked_host.rb
r5580 r5581 210 210 print_status " Got an #{rr0.type} record: #{rr0.inspect}" 211 211 if rr0.type == 'NS' 212 print_status " Querying recon nameserver for address of #{rr0.nsdname}..."212 print_status " Querying recon nameserver for address of #{rr0.nsdname}..." 213 213 answer1 = res0.send(rr0.nsdname) # get the ns's answer for the hostname 214 214 #print_status " Got answer with #{answer1.header.anCount} answers, #{answer1.header.nsCount} authorities" 215 215 answer1.answer.each do |rr1| 216 print_status " Got an #{rr1.type} record: #{rr1.inspect}"216 print_status " Got an #{rr1.type} record: #{rr1.inspect}" 217 217 res2 = Net::DNS::Resolver.new(:nameservers => rr1.address, :dns_search => false, :recursive => false, :retry => 1) 218 print_status " Checking Authoritativeness: Querying #{rr1.address} for #{domain}..."218 print_status " Checking Authoritativeness: Querying #{rr1.address} for #{domain}..." 219 219 answer2 = res2.send(domain) 220 220 if answer2 and answer2.header.auth? and answer2.header.anCount >= 1 221 221 nsrec = {:name => rr0.nsdname, :addr => rr1.address} 222 222 barbs << nsrec 223 print_status " #{rr0.nsdname} is authoritative for #{domain}, adding to list of nameservers to spoof as"223 print_status " #{rr0.nsdname} is authoritative for #{domain}, adding to list of nameservers to spoof as" 224 224 end 225 225 end
