Improved discovered model mapping

This commit is contained in:
Luca Deri 2018-04-04 23:37:13 +02:00
parent 5d455fdf73
commit ca32f062be
3 changed files with 8 additions and 4 deletions

View file

@ -21,6 +21,7 @@ discover.apple_osx_versions = {
['14'] = 'OS X 10.10 (Yosemite)',
['15'] = 'OS X 10.11 (El Capitan)',
['16'] = 'OS X 10.12 (Sierra)',
['17'] = 'OS X 10.13 (High Sierra)',
}
discover.apple_products = {
@ -124,7 +125,7 @@ discover.apple_products = {
['iMac12,1'] = 'iMac "Core i3" 3.1 21.5-Inch (Late 2011)',
['MacBookAir4,2'] = 'MacBook Air "Core i5" 1.6 13" (Edu Only)',
['MacBookAir4,1'] = 'MacBook Air "Core i7" 1.8 11" (Mid-2011)',
['MacPro3,1'] = 'Mac Pro "Eight Core" 3.2 (2008)'
['MacPro3,1'] = 'Mac Pro "Eight Core" 3.2 (2008)',
}
discover.asset_icons = {

View file

@ -31,7 +31,7 @@ function mac2record(mac)
record["column_mac"] = mac2link(mac)
if(mac.fingerprint ~= "") then
record["column_mac"] = record["column_mac"]..' <i class="fa fa-hand-o-up fa-lg" aria-hidden="true" title="DHCP Fingerprinted"></i>'
record["column_mac"] = record["column_mac"]..' <i class="fa fa-hand-o-up fa-lg" aria-hidden="true" title="DHCP Fingerprinted"></i>'
-- io.write(mac.fingerprint.."\n")
end
@ -44,7 +44,8 @@ function mac2record(mac)
if(manufacturer == nil) then manufacturer = "" end
if(mac["model"] ~= nil) then
manufacturer = manufacturer .. " [ ".. mac["model"] .." ]"
local _model = discover.apple_products[mac["model"]] or mac["model"]
manufacturer = manufacturer .. " [ ".. _model .." ]"
end
record["column_manufacturer"] = manufacturer