Bug fixes, still not 100% working
git-svn-id: file:///home/svn/incoming/trunk@3262 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
87f23247a5
commit
595a2e1bba
|
@ -58,23 +58,28 @@ class Recon::Host::PortScanner::UdpProbeSweep < Msf::Recon::Discoverer::Host
|
|||
r = udp_sock.recvfrom(65535)
|
||||
while (r[1])
|
||||
alive = true if r[1]
|
||||
r = udp_sock.recvfrom(65535)
|
||||
r << udp_sock.recvfrom(65535)
|
||||
end
|
||||
|
||||
alive ? HostState::Alive : HostState::Unknown
|
||||
print_status("Discovered #{ip} through a response on #{r[2]}") if alive
|
||||
|
||||
|
||||
alive ? HostState::Alive : HostState::Dead
|
||||
|
||||
# Catch attempts to send to a broadcast address
|
||||
rescue Errno::EACCES
|
||||
HostState::Unknown
|
||||
HostState::Dead
|
||||
|
||||
# Catch 'connection refused' triggered by ICMP port unreachable
|
||||
rescue Errno::ECONNREFUSED
|
||||
print_status("Discovered #{ip} through an ICMP error message")
|
||||
HostState::Alive
|
||||
|
||||
# Catch any other errors...
|
||||
rescue => e
|
||||
p e
|
||||
HostState::Unknown
|
||||
print_status("Unknown error: #{e.to_s}")
|
||||
print_status(e.backtrace.join("\n"))
|
||||
HostState::Dead
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -103,7 +108,7 @@ class Recon::Host::PortScanner::UdpProbeSweep < Msf::Recon::Discoverer::Host
|
|||
def probe_pkt_netbios(ip)
|
||||
data =
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x3f\x00\x00\x00\x01\x00\x00\x00"+
|
||||
"\x00\x00\x00\x20\x43\x4b\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"+n
|
||||
"\x00\x00\x00\x20\x43\x4b\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"+
|
||||
"\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"+
|
||||
"\x41\x41\x00\x00\x21\x00\x01"
|
||||
return [data, 137]
|
||||
|
|
Loading…
Reference in New Issue