Skip to content

Commit

Permalink
Adds detection for various operating systems (#7722)
Browse files Browse the repository at this point in the history
* Adds detection for Baidu Yi
* Adds detection for Motorola EZX
* Adds detection for GEOS
* Adds detection for gNewSense
* Adds detection for GENIX
* Adds detection for Joli OS
* Adds detection for Turbolinux
* Adds detection for ULTRIX
* Adds detection for NEWS-OS
* Improves version detection for ThreadX
* Adds detection for NeXTSTEP
* Fix family for Turbolinux
* Fix Motorola EZX
* Adds detection for AROS
* Adds detection for OpenVMS
* Adds detection for Qtopia
* Adds detection for Star-Blade OS
* Adds detection for KIN OS
* Adds detection for WoPhone
---------

Co-authored-by: Tutik Alexsandr <[email protected]>
  • Loading branch information
liviuconcioiu and sanchezzzhak committed Jun 26, 2024
1 parent 65e5e41 commit 75d88bb
Show file tree
Hide file tree
Showing 4 changed files with 278 additions and 12 deletions.
30 changes: 24 additions & 6 deletions Parser/OperatingSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ class OperatingSystem extends AbstractParser
'AMZ' => 'Amazon Linux',
'AMG' => 'AmigaOS',
'ARM' => 'Armadillo OS',
'ARO' => 'AROS',
'ATV' => 'tvOS',
'ARL' => 'Arch Linux',
'AOS' => 'AOSC OS',
'ASP' => 'ASPLinux',
'BTR' => 'BackTrack',
'SBA' => 'Bada',
'BYI' => 'Baidu Yi',
'BEO' => 'BeOS',
'BLB' => 'BlackBerry OS',
'QNX' => 'BlackBerry Tablet OS',
Expand Down Expand Up @@ -85,6 +87,9 @@ class OperatingSystem extends AbstractParser
'FYD' => 'FydeOS',
'FUC' => 'Fuchsia',
'GNT' => 'Gentoo',
'GNX' => 'GENIX',
'GEO' => 'GEOS',
'GNS' => 'gNewSense',
'GRI' => 'GridOS',
'GTV' => 'Google TV',
'HPX' => 'HP-UX',
Expand All @@ -96,9 +101,11 @@ class OperatingSystem extends AbstractParser
'IRI' => 'IRIX',
'INF' => 'Inferno',
'JME' => 'Java ME',
'JOL' => 'Joli OS',
'KOS' => 'KaiOS',
'KAL' => 'Kali',
'KAN' => 'Kanotix',
'KIN' => 'KIN OS',
'KNO' => 'Knoppix',
'KTV' => 'KreaTV',
'KBT' => 'Kubuntu',
Expand All @@ -119,18 +126,22 @@ class OperatingSystem extends AbstractParser
'SMG' => 'MeeGo',
'MCD' => 'MocorDroid',
'MON' => 'moonOS',
'EZX' => 'Motorola EZX',
'MIN' => 'Mint',
'MLD' => 'MildWild',
'MOR' => 'MorphOS',
'NBS' => 'NetBSD',
'MTK' => 'MTK / Nucleus',
'MRE' => 'MRE',
'NXT' => 'NeXTSTEP',
'NWS' => 'NEWS-OS',
'WII' => 'Nintendo',
'NDS' => 'Nintendo Mobile',
'NOV' => 'Nova',
'OS2' => 'OS/2',
'T64' => 'OSF1',
'OBS' => 'OpenBSD',
'OVS' => 'OpenVMS',
'OVZ' => 'OpenVZ',
'OWR' => 'OpenWrt',
'OTV' => 'Opera TV',
Expand All @@ -144,6 +155,7 @@ class OperatingSystem extends AbstractParser
'PS3' => 'PlayStation',
'PVE' => 'Proxmox VE',
'PUR' => 'PureOS',
'QTP' => 'Qtopia',
'PIO' => 'Raspberry Pi OS',
'RAS' => 'Raspbian',
'RHT' => 'Red Hat',
Expand All @@ -168,6 +180,7 @@ class OperatingSystem extends AbstractParser
'SIR' => 'Sirin OS',
'SLW' => 'Slackware',
'SOS' => 'Solaris',
'SBL' => 'Star-Blade OS',
'SYL' => 'Syllable',
'SYM' => 'Symbian',
'SYS' => 'Symbian OS',
Expand All @@ -179,7 +192,9 @@ class OperatingSystem extends AbstractParser
'TIZ' => 'Tizen',
'TIV' => 'TiVo OS',
'TOS' => 'TmaxOS',
'TUR' => 'Turbolinux',
'UBT' => 'Ubuntu',
'ULT' => 'ULTRIX',
'UOS' => 'UOS',
'VID' => 'VIDAA',
'WAS' => 'watchOS',
Expand All @@ -192,6 +207,7 @@ class OperatingSystem extends AbstractParser
'WMO' => 'Windows Mobile',
'WPH' => 'Windows Phone',
'WRT' => 'Windows RT',
'WPO' => 'WoPhone',
'XBX' => 'Xbox',
'XBT' => 'Xubuntu',
'YNS' => 'YunOS',
Expand All @@ -212,9 +228,9 @@ class OperatingSystem extends AbstractParser
'Android' => [
'AND', 'CYN', 'FIR', 'REM', 'RZD', 'MLD', 'MCD', 'YNS', 'GRI', 'HAR',
'ADR', 'CLR', 'BOS', 'REV', 'LEN', 'SIR', 'RRS', 'WER', 'PIC', 'ARM',
'HEL',
'HEL', 'BYI',
],
'AmigaOS' => ['AMG', 'MOR'],
'AmigaOS' => ['AMG', 'MOR', 'ARO'],
'BlackBerry' => ['BLB', 'QNX'],
'Brew' => ['BMP'],
'BeOS' => ['BEO', 'HAI'],
Expand All @@ -233,20 +249,22 @@ class OperatingSystem extends AbstractParser
'FOR', 'MON', 'KAN', 'ZEN', 'LND', 'LNS', 'CHN', 'AMZ', 'TEN', 'CST',
'NOV', 'ROU', 'ZOR', 'RED', 'KAL', 'ORA', 'VID', 'TIV', 'BSN', 'RAS',
'UOS', 'PIO', 'FRI', 'LIR', 'WEB', 'SER', 'ASP', 'AOS', 'LOO', 'EUL',
'SCI', 'ALP', 'CLO', 'ROC', 'OVZ', 'PVE', 'RST',
'SCI', 'ALP', 'CLO', 'ROC', 'OVZ', 'PVE', 'RST', 'EZX', 'GNS', 'JOL',
'TUR', 'QTP', 'WPO',
],
'Mac' => ['MAC'],
'Mobile Gaming Console' => ['PSP', 'NDS', 'XBX'],
'OpenVMS' => ['OVS'],
'Real-time OS' => ['MTK', 'TDX', 'MRE', 'JME', 'REX'],
'Other Mobile' => ['WOS', 'POS', 'SBA', 'TIZ', 'SMG', 'MAE', 'LUN'],
'Other Mobile' => ['WOS', 'POS', 'SBA', 'TIZ', 'SMG', 'MAE', 'LUN', 'GEO'],
'Symbian' => ['SYM', 'SYS', 'SY3', 'S60', 'S40'],
'Unix' => [
'SOS', 'AIX', 'HPX', 'BSD', 'NBS', 'OBS', 'DFB', 'SYL', 'IRI', 'T64',
'INF', 'ELE',
'INF', 'ELE', 'GNX', 'ULT', 'NWS', 'NXT', 'SBL',
],
'WebTV' => ['WTV'],
'Windows' => ['WIN'],
'Windows Mobile' => ['WPH', 'WMO', 'WCE', 'WRT', 'WIO'],
'Windows Mobile' => ['WPH', 'WMO', 'WCE', 'WRT', 'WIO', 'KIN'],
'Other Smart TV' => ['WHS'],
];

Expand Down
140 changes: 138 additions & 2 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
-
user_agent: MOT-A1600/1.0 LinuxOS/2.4.20 Release/8.22.2006 Browser/Opera8.00 Profile/MIDP-2.0 Configuration/CLDC-1.1 Software/R542_G_11.61.33R
os:
name: GNU/Linux
short_name: LIN
name: Motorola EZX
short_name: EZX
version: ""
platform: ""
family: GNU/Linux
Expand Down Expand Up @@ -4966,3 +4966,139 @@
version: "18.0"
platform: ""
family: iOS
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.3.4; xx; Baidu Yi on Passion Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) FlyFlow/2.2 Version/4.0 Mobile Safari/533.1
os:
name: Baidu Yi
short_name: BYI
version: ""
platform: ""
family: Android
-
user_agent: Nokia-Communicator-WWW-Browser/3.0 (Geos 3.0 Nokia-9110)
os:
name: GEOS
short_name: GEO
version: "3.0"
platform: ""
family: Other Mobile
-
user_agent: Mozilla/5.0 (X11; U; Linux x86_64; xx) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ gNewSense/parkes (2.30.6-1gnewsense1) Epiphany/2.30.6
os:
name: gNewSense
short_name: GNS
version: 2.30.6
platform: x64
family: GNU/Linux
-
user_agent: Mozilla/5.0 (X11; U; GENIX 4.1 MG-200/NS32332; en-US; rv:4.7.1.1) Gecko/20080815 SeaMonkey/1.2.3
os:
name: GENIX
short_name: GNX
version: "4.1"
platform: ""
family: Unix
-
user_agent: Mozilla/5.0 (X11; Jolicloud Linux i686) AppleWebKit/537.6 (KHTML, like Gecko) Joli OS/1.2 Chromium/23.0.1240.0 Chrome/23.0.1240.0 Safari/537.6
os:
name: Joli OS
short_name: JOL
version: "1.2"
platform: x86
family: GNU/Linux
-
user_agent: Mozilla/5.0 (X11; U; Linux i686; xx; rv:1.9.1.11) Gecko/20100728 Turbolinux/3.5.11-1 Firefox/3.5.11
os:
name: Turbolinux
short_name: TUR
version: 3.5.11
platform: x86
family: GNU/Linux
-
user_agent: Links (2.8; ULTRIX 4.5 VAX; GNU C 1; text)
os:
name: ULTRIX
short_name: ULT
version: "4.5"
platform: ""
family: Unix
-
user_agent: Mozilla/1.1I (X11; I; NEWS-OS 6.1.1 news5000)
os:
name: NEWS-OS
short_name: NWS
version: 6.1.1
platform: ""
family: Unix
-
user_agent: PhilipsX2300/W1245_V12 ThreadX_OS/4.0 MOCOR/W12 Release/11.08.2012 Browser/Dorado1.0
os:
name: ThreadX
short_name: TDX
version: "4.0"
platform: ""
family: Real-time OS
-
user_agent: WorldWideweb (NEXT)
os:
name: NeXTSTEP
short_name: NXT
version: ""
platform: ""
family: Unix
-
user_agent: Mozilla/5.0 (i386; AROS 0.0; Odyssey Web Browser; rv:1.23) AppleWebKit/538.1 (KHTML, like Gecko) OWB/1.23 Safari/538.1
os:
name: AROS
short_name: ARO
version: ""
platform: x86
family: AmigaOS
-
user_agent: 'VMS_Mosaic/3.8-1 (Motif;OpenVMS V7.3-2 DEC 3000 - M700) libwww/2.12_Mosaic'
os:
name: OpenVMS
short_name: OVS
version: "7.3"
platform: ""
family: OpenVMS
-
user_agent: Mozilla/4.08 (PDA; SL-C860/1.40,Qtopia/1.5.4) NetFront/3.1 480x640
os:
name: Qtopia
short_name: QTP
version: 1.5.4
platform: ""
family: GNU/Linux
-
user_agent: Mozilla/6.0 (Future Star Technologies Corp. Star-Blade OS; U; en-US) iNet Browser 2.5
os:
name: Star-Blade OS
short_name: SBL
version: ""
platform: ""
family: Unix
-
user_agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.12; en-US; KIN.One 1.0)
os:
name: KIN OS
short_name: KIN
version: "1.0"
platform: ""
family: Windows Mobile
-
user_agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.12; en-US; KIN.Two 1.0)
os:
name: KIN OS
short_name: KIN
version: "1.0"
platform: ""
family: Windows Mobile
-
user_agent: TCL_J720/1.0 WoPhone/1.0 UPhone/1.0 Browser/UPhoneWebBrowser1.0 Profile/MIDP-1.0 Configuration/CLDC-1.0
os:
name: WoPhone
short_name: WPO
version: "1.0"
platform: ""
family: GNU/Linux
4 changes: 2 additions & 2 deletions Tests/fixtures/feature_phone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@
-
user_agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.12; es-US; KIN.Two 1.0)
os:
name: Windows CE
version: ""
name: KIN OS
version: "1.0"
platform: ""
client:
type: browser
Expand Down
Loading

0 comments on commit 75d88bb

Please sign in to comment.