code cleanup/reformat os discovery files

git-svn-id: http://www.observium.org/svn/observer/trunk@1833 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-14 19:16:40 +00:00
parent 8c2422d671
commit c00959e44b
72 changed files with 288 additions and 338 deletions

View File

@@ -1,10 +1,9 @@
<?php
if(!$os) {
if(strstr($sysDescr, "3Com Switch ")) { $os = "3com"; }
else if(strstr($sysDescr, "3Com SuperStack")) { $os = "3com"; }
if (!$os)
{
if (strstr($sysDescr, "3Com Switch ")) { $os = "3com"; }
else if (strstr($sysDescr, "3Com SuperStack")) { $os = "3com"; }
}
?>
?>

View File

@@ -1,8 +1,8 @@
<?php
if(!$os)
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.1671")) { $os = "adva"; }
}
?>
?>

View File

@@ -1,11 +1,10 @@
<?php
if(!$os) {
if(strpos($sysDescr, "Apple AirPort") !== FALSE) { $os = "airport"; }
else if(strpos($sysDescr, "Apple Base Station") !== FALSE) { $os = "airport"; }
else if(strpos($sysDescr, "Base Station V3.84") !== FALSE) { $os = "airport"; }
if (!$os)
{
if (strpos($sysDescr, "Apple AirPort") !== FALSE) { $os = "airport"; }
else if (strpos($sysDescr, "Apple Base Station") !== FALSE) { $os = "airport"; }
else if (strpos($sysDescr, "Base Station V3.84") !== FALSE) { $os = "airport"; }
}
?>
?>

View File

@@ -1,10 +1,9 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/8VD-X20/", $sysDescr)) { $os = "minkelsrms"; }
if (preg_match("/SensorProbe/i", $sysDescr)) { $os = "akcp"; }
}
?>
?>

View File

@@ -1,11 +1,9 @@
<?php
if(!$os) {
if(strstr($sysObjectId, ".1.3.6.1.4.1.207")) { $os = "allied"; }
if(strstr($sysObjectId, ".1.3.6.1.4.1.207.1.4.126")) { unset($os); }
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.207")) { $os = "allied"; }
if (strstr($sysObjectId, ".1.3.6.1.4.1.207.1.4.126")) { unset($os); }
}
?>
?>

View File

@@ -1,13 +1,11 @@
<?php
if(!$os) {
if(strstr($sysDescr, "APC Web/SNMP Management Card")) { $os = "apc"; }
else if(strstr($sysDescr, "APC Switched Rack PDU")) { $os = "apc"; }
else if(strstr($sysDescr, "APC MasterSwitch PDU")) { $os = "apc"; }
else if(strstr($sysDescr, "APC Metered Rack PDU")) { $os = "apc"; }
if (!$os)
{
if (strstr($sysDescr, "APC Web/SNMP Management Card")) { $os = "apc"; }
elseif (strstr($sysDescr, "APC Switched Rack PDU")) { $os = "apc"; }
elseif (strstr($sysDescr, "APC MasterSwitch PDU")) { $os = "apc"; }
elseif (strstr($sysDescr, "APC Metered Rack PDU")) { $os = "apc"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Raid Subsystem V")) { $os = "areca"; }
if (!$os)
{
if (strstr($sysDescr, "Raid Subsystem V")) { $os = "areca"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Arista Networks EOS")) { $os = "arista_eos"; }
if (!$os)
{
if (strstr($sysDescr, "Arista Networks EOS")) { $os = "arista_eos"; }
}
?>
?>

View File

@@ -1,7 +1,8 @@
<?php
if(!$os) {
if(preg_match("/^Cisco\ Adaptive\ Security\ Appliance/", $sysDescr)) { $os = "asa"; }
if (!$os)
{
if (preg_match("/^Cisco\ Adaptive\ Security\ Appliance/", $sysDescr)) { $os = "asa"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/AXIS.*Network Camera/", $sysDescr)) { $os = "axiscam"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/^AXIS .* Network Document Server/", $sysDescr)) { $os = "axisdocserver"; }
}
?>
?>

View File

@@ -1,10 +1,8 @@
<?php
if(!$os) {
if(stripos($sysDescr, "bcm963") !== FALSE) { $os = "bcm963"; }
if (!$os)
{
if (stripos($sysDescr, "bcm963") !== FALSE) { $os = "bcm963"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/Brother NC-.*h,/", $sysDescr)) { $os = "brother"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Cisco Systems Catalyst 1900")) { $os = "cat1900"; }
if (!$os)
{
if (strstr($sysDescr, "Cisco Systems Catalyst 1900")) { $os = "cat1900"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Cisco Catalyst Operating System Software")) { $os = "catos"; }
if (!$os)
{
if (strstr($sysDescr, "Cisco Catalyst Operating System Software")) { $os = "catos"; }
}
?>
?>

View File

@@ -1,11 +1,10 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Dell Color Laser")) { $os = "dell-laser"; }
elseif(strstr($sysDescr, "Dell Laser Printer")) { $os = "dell-laser"; }
elseif(preg_match("/^Dell.*MFP/", $sysDescr)) { $os = "dell-laser"; }
if (!$os)
{
if (strstr($sysDescr, "Dell Color Laser")) { $os = "dell-laser"; }
elseif (strstr($sysDescr, "Dell Laser Printer")) { $os = "dell-laser"; }
elseif (preg_match("/^Dell.*MFP/", $sysDescr)) { $os = "dell-laser"; }
}
?>
?>

View File

@@ -1,8 +1,8 @@
<?php
if(!$os)
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.2254.2.4")) { $os = "deltaups"; }
}
?>
?>

View File

@@ -1,12 +1,11 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/D-Link DES-/", $sysDescr)) { $os = "dlink"; }
else if (preg_match("/Dlink DES-/", $sysDescr)) { $os = "dlink"; }
else if (preg_match("/^DES-/", $sysDescr)) { $os = "dlink"; }
else if (preg_match("/^DGS-/", $sysDescr)) { $os = "dlink"; }
}
?>
?>

View File

@@ -1,11 +1,10 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/D-Link .* AP/", $sysDescr)) { $os = "dlinkap"; }
else if (preg_match("/D-Link DAP-/", $sysDescr)) { $os = "dlinkap"; }
else if (preg_match("/D-Link Access Point/", $sysDescr)) { $os = "dlinkap"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Dell Out-of-band SNMP Agent for Remote Access Controller")) { $os = "drac"; }
if (!$os)
{
if (strstr($sysDescr, "Dell Out-of-band SNMP Agent for Remote Access Controller")) { $os = "drac"; }
}
?>
?>

View File

@@ -1,10 +1,9 @@
<?php
if(!$os)
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.14125.100.1.3")) { $os = "engenius"; }
else if (strstr($sysObjectId, ".1.3.6.1.4.1.14125.101.1.3")) { $os = "engenius"; }
}
?>
?>

View File

@@ -1,11 +1,9 @@
<?php
if(!$os) {
if(strstr($sysObjectId, ".1.3.6.1.4.1.1916.2")) { $os = "extremeware"; }
if(strstr($sysDescr, "XOS")) { $os = "xos"; }
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.1916.2")) { $os = "extremeware"; }
if (strstr($sysDescr, "XOS")) { $os = "xos"; }
}
?>
?>

View File

@@ -1,10 +1,9 @@
<?php
if(!$os) {
if (strstr($sysObjectId, ".1.3.6.1.4.1.12356.15")) { $os = "fortigate"; }
if (strstr($sysObjectId, ".1.3.6.1.4.1.12356.101.1")) { $os = "fortigate"; }
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.12356.15")) { $os = "fortigate"; }
if (strstr($sysObjectId, ".1.3.6.1.4.1.12356.101.1")) { $os = "fortigate"; }
}
?>
?>

View File

@@ -1,8 +1,10 @@
<?php
if(!$os) {
if(strstr($sysDescr, "FreeBSD")) { $os = "freebsd"; } ## It's FreeBSD!
if(strstr($sysDescr, "Voswall")) { $os = "voswall"; } ## Oh-No-It-Isn't!!
if(strstr($sysDescr, "m0n0wall")) { $os = "monowall"; } ## Ditto
if (!$os)
{
if (strstr($sysDescr, "FreeBSD")) { $os = "freebsd"; } ## It's FreeBSD!
if (strstr($sysDescr, "Voswall")) { $os = "voswall"; } ## Oh-No-It-Isn't!!
if (strstr($sysDescr, "m0n0wall")) { $os = "monowall"; } ## Ditto
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Force10 Operating System")) { $os = "ftos"; }
if (!$os)
{
if (strstr($sysDescr, "Force10 Operating System")) { $os = "ftos"; }
}
?>
?>

View File

@@ -1,12 +1,14 @@
<?php
if(!$os) {
if ($sysDescr == "") {
if (snmp_get($device, "GAMATRONIC-MIB::psUnitManufacture.0", "-Oqv", "") == "Gamatronic") {
$os = "gamatronicups";
}
}
if (!$os)
{
if ($sysDescr == "")
{
if (snmp_get($device, "GAMATRONIC-MIB::psUnitManufacture.0", "-Oqv", "") == "Gamatronic")
{
$os = "gamatronicups";
}
}
}
?>
?>

View File

@@ -1,10 +1,8 @@
<?php
if(!$os) {
if(strpos($sysDescr, "IES-") !== FALSE) { $os = "ies"; }
if (!$os)
{
if (strpos($sysDescr, "IES-") !== FALSE) { $os = "ies"; }
}
?>
?>

View File

@@ -1,14 +1,13 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Cisco Internetwork Operating System Software")) { $os = "ios"; }
else if(strstr($sysDescr, "IOS (tm)")) { $os = "ios"; }
else if(strstr($sysDescr, "Cisco IOS Software")) { $os = "ios"; }
if (!$os)
{
if (strstr($sysDescr, "Cisco Internetwork Operating System Software")) { $os = "ios"; }
else if (strstr($sysDescr, "IOS (tm)")) { $os = "ios"; }
else if (strstr($sysDescr, "Cisco IOS Software")) { $os = "ios"; }
if(strstr($sysDescr, "IOS-XE")) { $os = "iosxe"; }
if(strstr($sysDescr, "IOS XR")) { $os = "iosxr"; }
if (strstr($sysDescr, "IOS-XE")) { $os = "iosxe"; }
if (strstr($sysDescr, "IOS XR")) { $os = "iosxr"; }
}
?>
?>

View File

@@ -1,8 +1,8 @@
<?php
if(!$os)
if (!$os)
{
if (strstr($sysObjectId, "1.3.6.1.4.1.2468.1.4.2.1")) { $os = "ipoman"; }
}
?>
?>

View File

@@ -1,7 +1,8 @@
<?php
if(!$os) {
if(preg_match("/IronWare/", $sysDescr)) { $os = "ironware"; }
if (!$os)
{
if (preg_match("/IronWare/", $sysDescr)) { $os = "ironware"; }
}
?>
?>

View File

@@ -1,11 +1,10 @@
<?php
if(!$os) {
if(strstr($sysDescr, "JETDIRECT")) { $os = "jetdirect"; }
else if(strstr($sysDescr, "HP ETHERNET MULTI-ENVIRONMENT")) { $os = "jetdirect"; }
else if(strstr($sysObjectId, ".1.3.6.1.4.1.11.1")) { $os = "jetdirect"; }
if (!$os)
{
if (strstr($sysDescr, "JETDIRECT")) { $os = "jetdirect"; }
else if (strstr($sysDescr, "HP ETHERNET MULTI-ENVIRONMENT")) { $os = "jetdirect"; }
else if (strstr($sysObjectId, ".1.3.6.1.4.1.11.1")) { $os = "jetdirect"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysObjectId, ".1.3.6.1.4.1.2636")) { $os = "junos"; }
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.2636")) { $os = "junos"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysObjectId, ".1.3.6.1.4.1.4874")) { $os = "junose"; }
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.4874")) { $os = "junose"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysObjectId, "1.3.6.1.4.1.8239.1.2.9")) { $os = "jwos"; }
if (!$os)
{
if (strstr($sysObjectId, "1.3.6.1.4.1.8239.1.2.9")) { $os = "jwos"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "KONICA MINOLTA ")) { $os = "konica"; }
if (!$os)
{
if (strstr($sysDescr, "KONICA MINOLTA ")) { $os = "konica"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "KYOCERA ")) { $os = "kyocera"; }
if (!$os)
{
if (strstr($sysDescr, "KYOCERA ")) { $os = "kyocera"; }
}
?>
?>

View File

@@ -1,3 +0,0 @@
<?php
?>

View File

@@ -1,7 +1,8 @@
<?php
if(!$os) {
if(preg_match("/^Linux/", $sysDescr)) { $os = "linux"; }
if (!$os)
{
if (preg_match("/^Linux/", $sysDescr)) { $os = "linux"; }
}
?>
?>

View File

@@ -1,4 +0,0 @@
<?php
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "MGE Switched PDU")) { $os = "mgepdu"; }
if (!$os)
{
if (strstr($sysDescr, "MGE Switched PDU")) { $os = "mgepdu"; }
}
?>
?>

View File

@@ -1,11 +1,11 @@
<?php
if(!$os)
if (!$os)
{
if(strstr($sysDescr, "Pulsar M")) { $os = "mgeups"; }
if (strstr($sysDescr, "Pulsar M")) { $os = "mgeups"; }
else if (preg_match("/^Galaxy /", $sysDescr)) { $os = "mgeups"; }
else if (preg_match("/^Evolution /", $sysDescr)) { $os = "mgeups"; }
else if ($sysDescr == "MGE UPS SYSTEMS - Network Management Proxy") { $os = "mgeups"; }
}
?>
?>

View File

@@ -1,7 +1,8 @@
<?php
if(!$os) {
if(preg_match("/^NetBSD/", $sysDescr)) { $os = "netbsd"; }
if (!$os)
{
if (preg_match("/^NetBSD/", $sysDescr)) { $os = "netbsd"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/^NetMan.*plus/", $sysDescr)) { $os = "netmanplus"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/^Netopia /", $sysDescr)) { $os = "netopia"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Novell NetWare")) { $os = "netware"; }
if (!$os)
{
if (strstr($sysDescr, "Novell NetWare")) { $os = "netware"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "NX-OS")) { $os = "nxos"; }
if (!$os)
{
if (strstr($sysDescr, "NX-OS")) { $os = "nxos"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "OKI OkiLAN")) { $os = "okilan"; }
if (!$os)
{
if (strstr($sysDescr, "OKI OkiLAN")) { $os = "okilan"; }
}
?>
?>

View File

@@ -1,7 +1,8 @@
<?php
if(!$os) {
if(preg_match("/^OpenBSD/", $sysDescr)) { $os = "openbsd"; }
if (!$os)
{
if (preg_match("/^OpenBSD/", $sysDescr)) { $os = "openbsd"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "PacketShaper")) { $os = "packetshaper"; }
if (!$os)
{
if (strstr($sysDescr, "PacketShaper")) { $os = "packetshaper"; }
}
?>
?>

View File

@@ -1,10 +1,9 @@
<?php
if(!$os) {
if($sysDescr == "SNMP TME") { $os = "papouch-tme"; }
else if($sysDescr == "TME") { $os = "papouch-tme"; }
if (!$os)
{
if ($sysDescr == "SNMP TME") { $os = "papouch-tme"; }
else if ($sysDescr == "TME") { $os = "papouch-tme"; }
}
?>
?>

View File

@@ -7,4 +7,4 @@ if (!$os)
else if (preg_match("/Dell.*Gigabit\ Ethernet/i",$sysDescr)) { $os = "powerconnect"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysObjectId, ".1.3.6.1.4.1.674.10893.2.102")) { $os = "powervault"; }
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.674.10893.2.102")) { $os = "powervault"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os)
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.534")) { $os = "powerware"; }
}
?>
?>

View File

@@ -1,10 +1,9 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/^Prestige \d/", $sysDescr)) { $os = "prestige"; }
else if (preg_match("/^P-.*-/", $sysDescr)) { $os = "prestige"; }
}
?>
?>

View File

@@ -1,10 +1,8 @@
<?php
if(!$os) {
if(stristr($sysDescr, "ProCurve")) { $os = "procurve"; }
if (!$os)
{
if (stristr($sysDescr, "ProCurve")) { $os = "procurve"; }
}
?>
?>

View File

@@ -6,4 +6,4 @@ if (!$os)
if (strstr($sysDescr, "AT-8000")) { $os = "radlan"; } /* Allied Telesis AT-8000 */
}
?>
?>

View File

@@ -1,7 +1,8 @@
<?php
if(!$os) {
if(preg_match("/Redback/", $sysDescr)) { $os = "redback"; }
if (!$os)
{
if (preg_match("/Redback/", $sysDescr)) { $os = "redback"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "RICOH Aficio")) { $os = "ricoh"; }
if (!$os)
{
if (strstr($sysDescr, "RICOH Aficio")) { $os = "ricoh"; }
}
?>
?>

View File

@@ -1,12 +1,14 @@
<?php
if(!$os) {
if ($sysDescr == "router") {
if (is_numeric(snmp_get($device, "SNMPv2-SMI::enterprises.14988.1.1.4.3.0", "-Oqv", ""))) {
$os = "routeros";
}
}
if (!$os)
{
if ($sysDescr == "router")
{
if (is_numeric(snmp_get($device, "SNMPv2-SMI::enterprises.14988.1.1.4.3.0", "-Oqv", "")))
{
$os = "routeros";
}
}
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if(!$os) {
if(strstr($sysDescr, "SAN-OS")) { $os = "sanos"; }
if (!$os)
{
if (strstr($sysDescr, "SAN-OS")) { $os = "sanos"; }
}
?>
?>

View File

@@ -1,10 +1,9 @@
<?php
if(!$os) {
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.674.3224.1")) { $os = "screenos"; }
if (strstr($sysObjectId, ".1.3.6.1.4.1.3224")) { $os = "screenos"; }
}
?>
?>

View File

@@ -1,15 +1,16 @@
<?php
if(!$os) {
if(preg_match("/^SunOS/", $sysDescr))
if (!$os)
{
if (preg_match("/^SunOS/", $sysDescr))
{
$os = "solaris";
list(,,$version) = explode (" ", $sysDescr);
if($version > "5.10") { $os = "opensolaris"; }
if($version > "5.10") {
if(preg_match("/oi_/", $sysDescr)) { $os = "openindiana"; }
if ($version > "5.10") { $os = "opensolaris"; }
if ($version > "5.10") {
if (preg_match("/oi_/", $sysDescr)) { $os = "openindiana"; }
}
}
}
?>
?>

View File

@@ -5,4 +5,4 @@ if (!$os)
if (strstr($sysDescr, "SonicWALL")) { $os = "sonicwall"; }
}
?>
?>

View File

@@ -1,11 +1,10 @@
<?php
if(!$os) {
if(strpos($sysDescr, "TG585v7") !== FALSE) { $os = "speedtouch"; }
else if(strpos($sysDescr, "SpeedTouch ") !== FALSE) { $os = "speedtouch"; }
if (!$os)
{
if (strpos($sysDescr, "TG585v7") !== FALSE) { $os = "speedtouch"; }
else if (strpos($sysDescr, "SpeedTouch ") !== FALSE) { $os = "speedtouch"; }
else if (preg_match("/^ST\d/", $sysDescr)) { $os = "speedtouch"; }
}
?>
?>

View File

@@ -1,8 +1,8 @@
<?php
if(!$os) {
if(preg_match("/^Tranzeo/", $sysDescr)) { $os = "tranzeo"; }
if (!$os)
{
if (preg_match("/^Tranzeo/", $sysDescr)) { $os = "tranzeo"; }
}
?>
?>

View File

@@ -1,11 +1,10 @@
<?php
if(!$os) {
if(stristr($sysDescr, "VRP (R) Software")) { $os = "vrp"; }
else if(stristr($sysDescr, "VRP Software Version")) { $os = "vrp"; }
else if(stristr($sysDescr, "Software Version VRP")) { $os = "vrp"; }
if (!$os)
{
if (stristr($sysDescr, "VRP (R) Software")) { $os = "vrp"; }
else if (stristr($sysDescr, "VRP Software Version")) { $os = "vrp"; }
else if (stristr($sysDescr, "Software Version VRP")) { $os = "vrp"; }
}
?>
?>

View File

@@ -1,7 +1,8 @@
<?php
if(!$os) {
if(preg_match("/^Vyatta/", $sysDescr)) { $os = "vyatta"; }
if (!$os)
{
if (preg_match("/^Vyatta/", $sysDescr)) { $os = "vyatta"; }
}
?>
?>

View File

@@ -1,8 +1,8 @@
<?php
if(!$os) {
if(preg_match("/Windows/", $sysDescr)) { $os = "windows"; }
if (!$os)
{
if (preg_match("/Windows/", $sysDescr)) { $os = "windows"; }
}
?>
?>

View File

@@ -1,13 +1,12 @@
<?php
if(!$os)
if (!$os)
{
if ($sysDescr == 'NETOS 6.0')
{
if(strstr($sysObjectId, ".1.3.6.1.4.1.901.1")) { $os = "wxgoos"; }
if (strstr($sysObjectId, ".1.3.6.1.4.1.901.1")) { $os = "wxgoos"; }
}
if (strstr($sysObjectId, ".1.3.6.1.4.1.17373")) { $os = "wxgoos"; }
}
?>
?>

View File

@@ -1,10 +1,9 @@
<?php
if(!$os) {
if(strstr($sysDescr, "Xerox Phaser")) { $os = "xerox"; }
else if(strstr($sysDescr, "Xerox WorkCentre")) { $os = "xerox"; }
if (!$os)
{
if (strstr($sysDescr, "Xerox Phaser")) { $os = "xerox"; }
else if (strstr($sysDescr, "Xerox WorkCentre")) { $os = "xerox"; }
}
?>
?>

View File

@@ -1,10 +1,8 @@
<?php
if(!$os) {
if(strpos($sysDescr, "ZyWALL") !== FALSE) { $os = "zywall"; }
if (!$os)
{
if (strpos($sysDescr, "ZyWALL") !== FALSE) { $os = "zywall"; }
}
?>
?>

View File

@@ -1,9 +1,8 @@
<?php
if (!$os) {
if (!$os)
{
if (preg_match("/^ES-/", $sysDescr)) { $os = "zyxeles"; }
}
?>
?>