More nmap import foo
git-svn-id: file:///home/svn/framework3/trunk@8493 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
c47e4db74d
commit
2460037fdd
|
@ -1122,11 +1122,29 @@ class DBManager
|
||||||
end
|
end
|
||||||
data[:state] = (h["status"] == "up") ? Msf::HostState::Alive : Msf::HostState::Dead
|
data[:state] = (h["status"] == "up") ? Msf::HostState::Alive : Msf::HostState::Dead
|
||||||
|
|
||||||
|
# XXX: There can be multiple matches, but we only see the *last* right now
|
||||||
if (h["os_accuracy"] and h["os_accuracy"].to_i > 75)
|
if (h["os_accuracy"] and h["os_accuracy"].to_i > 75)
|
||||||
data[:os_name] = h["os_vendor"]
|
data[:os_name] = h["os_vendor"]
|
||||||
data[:os_sp] = h["os_version"]
|
data[:os_sp] = h["os_version"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Only passed through if its a 100% match
|
||||||
|
if (h["os_match"])
|
||||||
|
arch = nil
|
||||||
|
case h["os_match"]
|
||||||
|
when /x86|intel/i
|
||||||
|
data[:arch] = ARCH_X86
|
||||||
|
when /ppc|powerpc/i
|
||||||
|
data[:arch] = ARCH_PPC
|
||||||
|
when /sparc/i
|
||||||
|
data[:arch] = ARCH_SPARC
|
||||||
|
when /armle/i
|
||||||
|
data[:arch] = ARCH_ARMLE
|
||||||
|
when /armbe/i
|
||||||
|
data[:arch] = ARCH_ARMBE
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if ( h["reverse_dns"] )
|
if ( h["reverse_dns"] )
|
||||||
data[:name] = h["reverse_dns"]
|
data[:name] = h["reverse_dns"]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue