arp sweep: correct a bug on the timeout to better detect the latest reply
git-svn-id: file:///home/svn/framework3/trunk@12316 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
97f4531536
commit
d9e68141e0
|
@ -32,6 +32,8 @@ class Metasploit3 < Msf::Auxiliary
|
|||
register_options([
|
||||
OptString.new('SHOST', [true, "Source IP Address"]),
|
||||
OptString.new('SMAC', [true, "Source MAC Address"]),
|
||||
# one re-register TIMEOUT here with a lower value, cause 5 seconds will be enough in most of the case
|
||||
OptInt.new('TIMEOUT', [true, 'The number of seconds to wait for new data', 5]),
|
||||
], self.class)
|
||||
|
||||
deregister_options('SNAPLEN', 'FILTER')
|
||||
|
@ -62,7 +64,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
end
|
||||
end
|
||||
|
||||
etime = Time.now.to_f + (hosts.length * 0.05)
|
||||
etime = Time.now.to_f + datastore['TIMEOUT']
|
||||
while (Time.now.to_f < etime)
|
||||
while(reply = getreply())
|
||||
next if not reply[:arp]
|
||||
|
|
Loading…
Reference in New Issue