mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-10-29 18:07:27 +01:00
while(true)->loop, use thread.join
This commit is contained in:
parent
1001061a96
commit
2ea984423b
@ -313,7 +313,7 @@ module Msf
|
||||
begin
|
||||
to = ((datastore['TIMEOUT'] || 500).to_f * 8) / 1000.0
|
||||
::Timeout.timeout(to) do
|
||||
while true
|
||||
loop do
|
||||
my_packet = inject_reply(:udp, self.arp_capture)
|
||||
next unless my_packet
|
||||
next unless my_packet.payload == secret
|
||||
@ -349,7 +349,7 @@ module Msf
|
||||
begin
|
||||
to = ((datastore['TIMEOUT'] || 500).to_f * 8) / 1000.0
|
||||
::Timeout.timeout(to) do
|
||||
while true
|
||||
loop do
|
||||
my_packet = inject_reply(:arp, self.arp_capture)
|
||||
next unless my_packet
|
||||
next unless my_packet.arp_saddr_ip == target_ip
|
||||
|
@ -206,9 +206,7 @@ attr_accessor :sock, :thread
|
||||
|
||||
add_socket(self.sock)
|
||||
|
||||
while thread.alive?
|
||||
select(nil, nil, nil, 0.25)
|
||||
end
|
||||
self.thread.join
|
||||
end
|
||||
|
||||
def cleanup
|
||||
|
@ -173,9 +173,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
print_status("NBNS Spoofer started. Listening for NBNS requests with REGEX \"#{datastore['REGEX']}\" ...")
|
||||
|
||||
while thread.alive?
|
||||
IO.select(nil, nil, nil, 0.25)
|
||||
end
|
||||
self.thread.join
|
||||
print_status("NBNS Monitor thread exited...")
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user