mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
See #2134. Fixes all aux modules that uses sleep().
git-svn-id: file:///home/svn/framework3/trunk@9582 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
171543624a
commit
2cf9944681
@ -54,7 +54,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
sock.put(pkt)
|
||||
|
||||
# try to suck it all in.
|
||||
sleep(5)
|
||||
select(nil,nil,nil,5)
|
||||
|
||||
res = sock.get_once
|
||||
|
||||
|
@ -54,7 +54,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
print_status("Sending command: #{datastore['CMD']}")
|
||||
sock.put(pkt)
|
||||
|
||||
sleep(1)
|
||||
select(nil,nil,nil,1)
|
||||
|
||||
sock.get_once
|
||||
|
||||
|
@ -64,7 +64,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
sock.put(pkt)
|
||||
|
||||
sleep(s.to_i)
|
||||
select(nil,nil,nil,s.to_i)
|
||||
|
||||
res = sock.get_once(-1,3)
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
sock.put(pkt)
|
||||
print_status("writing #{pkt.length} bytes.")
|
||||
|
||||
sleep(0.5)
|
||||
select(nil,nil,nil,0.5)
|
||||
|
||||
print_status("reading")
|
||||
res = sock.get_once(-1,5)
|
||||
|
@ -177,7 +177,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
end
|
||||
|
||||
send_message(mime_msg.to_s)
|
||||
sleep wait
|
||||
select(nil,nil,nil,wait)
|
||||
end
|
||||
|
||||
print_status("Email sent..")
|
||||
|
@ -45,7 +45,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
# because we send our own malicious RCPT.
|
||||
# however we want to make use of MAILFROM
|
||||
# and raw_send_recv()
|
||||
#sleep(23) # so we can attach gdb to the child PID
|
||||
#select(nil,nil,nil,23) # so we can attach gdb to the child PID
|
||||
|
||||
sploit = ("A" * 255 + ";") * 4 + "A" * 217 + ";" + "\x5c\xff" * 28
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
return unless connect_login
|
||||
print_status("Sending command...")
|
||||
raw_send("SITE WHO\r\n")
|
||||
sleep(1)
|
||||
select(nil,nil,nil,1)
|
||||
disconnect
|
||||
end
|
||||
end
|
||||
|
@ -212,7 +212,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
})
|
||||
i += 1
|
||||
else
|
||||
sleep(0.01) and a.delete_if {|x| not x.alive?} while not a.empty?
|
||||
select(nil,nil,nil,0.01) and a.delete_if {|x| not x.alive?} while not a.empty?
|
||||
i = 0
|
||||
end
|
||||
end
|
||||
@ -248,7 +248,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
})
|
||||
i += 1
|
||||
else
|
||||
sleep(0.01) and a.delete_if {|x| not x.alive?} while not a.empty?
|
||||
select(nil,nil,nil,0.01) and a.delete_if {|x| not x.alive?} while not a.empty?
|
||||
i = 0
|
||||
end
|
||||
end
|
||||
@ -284,7 +284,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
})
|
||||
i += 1
|
||||
else
|
||||
sleep(0.01) and a.delete_if {|x| not x.alive?} while not a.empty?
|
||||
select(nil,nil,nil,0.01) and a.delete_if {|x| not x.alive?} while not a.empty?
|
||||
i = 0
|
||||
end
|
||||
end
|
||||
@ -361,7 +361,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
})
|
||||
i += 1
|
||||
else
|
||||
sleep(0.01) and a.delete_if {|x| not x.alive?} while not a.empty?
|
||||
select(nil,nil,nil,0.01) and a.delete_if {|x| not x.alive?} while not a.empty?
|
||||
i = 0
|
||||
end
|
||||
end
|
||||
|
@ -76,7 +76,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
if (datastore['VERBOSE'])
|
||||
print_status("Switching to channel: #{channel}")
|
||||
end
|
||||
sleep(1)
|
||||
select(nil,nil,nil,1)
|
||||
end
|
||||
ensure
|
||||
print_status("Closing interface")
|
||||
|
@ -68,7 +68,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
if (datastore['VERBOSE'])
|
||||
print_status("Switching to channel: #{channel}")
|
||||
end
|
||||
sleep(1)
|
||||
select(nil,nil,nil,1)
|
||||
end
|
||||
ensure
|
||||
print_status("Closing interface")
|
||||
|
@ -40,7 +40,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
sock.put(pkt)
|
||||
|
||||
sleep(0.25)
|
||||
select(nil,nil,nil,0.25)
|
||||
|
||||
data = sock.get_once
|
||||
|
||||
@ -54,4 +54,4 @@ class Metasploit3 < Msf::Auxiliary
|
||||
disconnect
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -40,7 +40,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
sock.put(pkt)
|
||||
|
||||
sleep(1)
|
||||
select(nil,nil,nil,1)
|
||||
|
||||
data = sock.get_once
|
||||
|
||||
@ -54,4 +54,4 @@ class Metasploit3 < Msf::Auxiliary
|
||||
disconnect
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -43,7 +43,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
sock.put(pkt)
|
||||
|
||||
sleep(0.5)
|
||||
select(nil,nil,nil,0.5)
|
||||
|
||||
data = sock.get_once
|
||||
|
||||
|
@ -45,7 +45,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
}, 5)
|
||||
|
||||
if ( res.body =~ /SERVICE_NAME=/ )
|
||||
sleep(2)
|
||||
select(nil,nil,nil,2)
|
||||
sid = res.body.scan(/SERVICE_NAME=([^\)]+)/)
|
||||
report_note(
|
||||
:host => ip,
|
||||
|
@ -41,7 +41,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
sock.put(pkt)
|
||||
|
||||
sleep(0.5)
|
||||
select(nil,nil,nil,0.5)
|
||||
|
||||
data = sock.get_once
|
||||
|
||||
|
@ -331,7 +331,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
when /NO DIAL *TONE/i
|
||||
nextnum = false
|
||||
modem.hangup
|
||||
sleep 1
|
||||
select(nil,nil,nil,1)
|
||||
next
|
||||
when nil
|
||||
modem.hangup
|
||||
@ -342,8 +342,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||
Object.save_to_file(dialrange, datfile)
|
||||
#dialrange.save_to_file(datfile)
|
||||
nextnum = true
|
||||
sleep 1 # we need at least a little buffer for the modem to hangup/reset
|
||||
sleep dialdelay - 1 if dialdelay >= 1
|
||||
select(nil,nil,nil,1) # we need at least a little buffer for the modem to hangup/reset
|
||||
select(nil,nil,nil,dialdelay-1) if dialdelay >= 1
|
||||
end
|
||||
|
||||
rescue ::Interrupt
|
||||
|
@ -216,7 +216,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
print_status("Failure: This hostname is already in the target cache: #{name}")
|
||||
print_status(" Cache entry expires on #{t}... sleeping.")
|
||||
cached = true
|
||||
sleep ttl
|
||||
select(nil,nil,nil,ttl)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user