mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-10-29 18:07:27 +01:00
Fix msftidy and tweak a few modules missing timeouts
This commit is contained in:
parent
a279db7710
commit
6e8415143c
@ -50,7 +50,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
filename.strip!
|
||||
pkt = "\x00\x01" + filename + "\x00" + "netascii" + "\x00"
|
||||
udp_sock.sendto(pkt, ip, datastore['RPORT'])
|
||||
resp = udp_sock.get(1)
|
||||
resp = udp_sock.get(3)
|
||||
if resp and resp.length >= 2 and resp[0, 2] == "\x00\x03"
|
||||
print_status("Found #{filename} on #{ip}")
|
||||
#Add Report
|
||||
|
@ -63,8 +63,9 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
def exploit
|
||||
|
||||
connect
|
||||
banner = sock.get_once.to_s.strip
|
||||
|
||||
print_status "Banner: #{banner = sock.gets}"
|
||||
print_status "Banner: #{banner}"
|
||||
|
||||
# NOTE: orig poc shellcode len: 84
|
||||
|
||||
|
@ -64,7 +64,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
print_status("Trying #{target.name} using lstrcpyA address at #{"0x%.8x" % target.ret }...")
|
||||
|
||||
udp_sock.put(request)
|
||||
udp_sock.get
|
||||
udp_sock.get(5)
|
||||
|
||||
handler(udp_sock)
|
||||
disconnect_udp
|
||||
|
@ -536,7 +536,7 @@ class Msftidy
|
||||
end
|
||||
|
||||
def check_udp_sock_get
|
||||
if @source =~ /udp_sock\.get[^\d]+/m
|
||||
if @source =~ /udp_sock\.get/m and source !~ /udp_sock\.get\([a-zA-Z0-9]+/
|
||||
info('Please specify a timeout to udp_sock.get')
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user