1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

Correct state processing in the additional address discovery code.

git-svn-id: file:///home/svn/framework3/trunk@11385 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2010-12-21 02:22:56 +00:00
parent 2bb7528e26
commit 8a4f6de5c4

View File

@ -119,7 +119,7 @@ class Metasploit3 < Msf::Auxiliary
end
select(nil, nil, nil, 0.25)
rescue ::Exception => e
print_error("Unknown error: #{e.class} #{e}")
print_error("Unknown error: #{e.class} #{e} #{e.backtrace}")
end
@results.keys.each do |ip|
@ -228,6 +228,8 @@ class Metasploit3 < Msf::Auxiliary
hname = nil
uname = nil
@results[addr] ||= {}
case rtype
when 0x21
rcnt = buff.slice!(0,1).unpack("C")[0]
@ -241,11 +243,9 @@ class Metasploit3 < Msf::Auxiliary
end
maddr = buff.slice!(0,6).unpack("C*").map{|c| "%.2x" % c }.join(":")
@results[addr] = {
:names => names,
:mac => maddr
}
@results[addr][:names] = names
@results[addr][:mac] = maddr
if (!hname and @results[addr][:names].length > 0)
@results[addr][:name] = @results[addr][:names][0][0]
end