Skip to content

Commit eb5bbb1

Browse files
Adds detection for OpenVZ, Proxmox VE and improves detection for Wear OS, Windows (#7658)
* Improves version detection for Windows * Adds detection for OpenVZ * Adds detection for Proxmox VE * Improves detection for Wear OS
1 parent 93c2d59 commit eb5bbb1

File tree

4 files changed

+53
-6
lines changed

4 files changed

+53
-6
lines changed

Parser/OperatingSystem.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class OperatingSystem extends AbstractParser
131131
'OS2' => 'OS/2',
132132
'T64' => 'OSF1',
133133
'OBS' => 'OpenBSD',
134+
'OVZ' => 'OpenVZ',
134135
'OWR' => 'OpenWrt',
135136
'OTV' => 'Opera TV',
136137
'ORA' => 'Oracle Linux',
@@ -141,6 +142,7 @@ class OperatingSystem extends AbstractParser
141142
'PLA' => 'Plasma Mobile',
142143
'PSP' => 'PlayStation Portable',
143144
'PS3' => 'PlayStation',
145+
'PVE' => 'Proxmox VE',
144146
'PUR' => 'PureOS',
145147
'PIO' => 'Raspberry Pi OS',
146148
'RAS' => 'Raspbian',
@@ -230,7 +232,7 @@ class OperatingSystem extends AbstractParser
230232
'FOR', 'MON', 'KAN', 'ZEN', 'LND', 'LNS', 'CHN', 'AMZ', 'TEN', 'CST',
231233
'NOV', 'ROU', 'ZOR', 'RED', 'KAL', 'ORA', 'VID', 'TIV', 'BSN', 'RAS',
232234
'UOS', 'PIO', 'FRI', 'LIR', 'WEB', 'SER', 'ASP', 'AOS', 'LOO', 'EUL',
233-
'SCI', 'ALP', 'CLO', 'ROC',
235+
'SCI', 'ALP', 'CLO', 'ROC', 'OVZ', 'PVE',
234236
],
235237
'Mac' => ['MAC'],
236238
'Mobile Gaming Console' => ['PSP', 'NDS', 'XBX'],

Tests/Parser/fixtures/oss.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4878,3 +4878,35 @@
48784878
version: "17.2"
48794879
platform: ""
48804880
family: iOS
4881+
-
4882+
user_agent: python-requests/1.2.3 CPython/2.7.2 Windows/post2008Server
4883+
os:
4884+
name: Windows
4885+
short_name: WIN
4886+
version: "8"
4887+
platform: ""
4888+
family: Windows
4889+
-
4890+
user_agent: python-requests/2.6.0 CPython/2.6.6 Linux/2.6.32-042stab127.2
4891+
os:
4892+
name: OpenVZ
4893+
short_name: OVZ
4894+
version: ""
4895+
platform: ""
4896+
family: GNU/Linux
4897+
-
4898+
user_agent: python-requests/2.4.3 CPython/3.4.2 Linux/4.4.6-1-pve
4899+
os:
4900+
name: Proxmox VE
4901+
short_name: PVE
4902+
version: ""
4903+
platform: ""
4904+
family: GNU/Linux
4905+
-
4906+
user_agent: python-requests/2.4.3 CPython/3.7.2 Linux/4.9.35-v7+
4907+
os:
4908+
name: Proxmox VE
4909+
short_name: PVE
4910+
version: "7"
4911+
platform: ""
4912+
family: GNU/Linux

Tests/fixtures/wearable.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,15 +1058,15 @@
10581058
-
10591059
user_agent: Mozilla/5.0 (Linux; Android 10; LEM14 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Mobile Safari/537.36
10601060
os:
1061-
name: Android
1062-
version: "10"
1061+
name: Wear OS
1062+
version: ""
10631063
platform: ""
10641064
client:
10651065
type: browser
10661066
name: Chrome Webview
10671067
version: 74.0.3729.186
10681068
engine: Blink
1069-
engine_version: "74.0.3729.186"
1069+
engine_version: 74.0.3729.186
10701070
device:
10711071
type: wearable
10721072
brand: LEMFO

regexes/oss.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@
66
###############
77

88
##########
9+
# Proxmox VE (https://pve.proxmox.com/wiki/Main_Page)
10+
##########
11+
- regex: 'Linux/(?:\d+\.[\d.-]+)-(?:pve|v(\d)\+)'
12+
name: 'Proxmox VE'
13+
version: '$1'
14+
15+
##########
16+
# OpenVZ (https://openvz.org/)
17+
##########
18+
- regex: 'Linux/(?:\d+\.[\d.-]+)-(?:\d+[\.\d]+)stab(?:\d+[\.\d]+)'
19+
name: 'OpenVZ'
20+
version: ''
21+
922
# Rocky Linux (https://rockylinux.org/)
1023
##########
1124
- regex: 'rocky/(\d+[\.\d]+)'
@@ -506,7 +519,7 @@
506519
##########
507520
# Wear OS (https://wearos.google.com/)
508521
##########
509-
- regex: 'Chrome/(\d+\.[.\d]+) Odd/|SM-R(?:8[6-9]|9)'
522+
- regex: 'Chrome/(\d+\.[.\d]+) Odd/|SM-R(?:8[6-9]|9)|LEM14'
510523
name: 'Wear OS'
511524
version: ''
512525

@@ -973,7 +986,7 @@
973986
name: 'Windows'
974987
version: 'Server 2012'
975988

976-
- regex: 'CYGWIN_NT-6\.2|Windows NT 6\.2|Windows 8'
989+
- regex: 'CYGWIN_NT-6\.2|Windows NT 6\.2|Windows 8|post2008Server'
977990
name: 'Windows'
978991
version: '8'
979992

0 commit comments

Comments
 (0)