From 155c4f23081bdb188199d9b11fc788c8f3f34cb4 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Wed, 6 Sep 2023 11:40:00 +0200 Subject: [PATCH] Adds detection for Norton Secure Browser, ALVA and improves detection for various browsers (#7466) * Rename Avira Scout to Avira Secure Browser and improves detection * Add client hints fixture for Samsung Browser * Add client hints fixture for Vivaldi * Adds detection for Norton Secure Browser * Adds detection for ALVA browser * Add client hints fixture for Yandex Browser --- Parser/Client/Browser.php | 8 ++- Tests/Parser/Client/fixtures/browser.yml | 78 +++++++++++++++++++++++- Tests/fixtures/clienthints.yml | 27 ++++++++ regexes/client/browsers.yml | 20 +++++- 4 files changed, 126 insertions(+), 7 deletions(-) diff --git a/Parser/Client/Browser.php b/Parser/Client/Browser.php index 2f139ae5c3..922e7ffb0c 100644 --- a/Parser/Client/Browser.php +++ b/Parser/Client/Browser.php @@ -84,6 +84,7 @@ class Browser extends AbstractClientParser 'AG' => 'ANTGalio', 'AL' => 'Aloha Browser', 'AH' => 'Aloha Browser Lite', + 'A8' => 'ALVA', 'AM' => 'Amaya', 'A3' => 'Amaze Browser', 'A5' => 'Amerigo', @@ -107,7 +108,7 @@ class Browser extends AbstractClientParser 'A2' => 'Atlas', 'AS' => 'Avast Secure Browser', 'VG' => 'AVG Secure Browser', - 'AC' => 'Avira Scout', + 'AC' => 'Avira Secure Browser', 'A1' => 'AwoX', 'BA' => 'Beaker Browser', 'BM' => 'Beamrise', @@ -349,6 +350,7 @@ class Browser extends AbstractClientParser 'NB' => 'Nokia Browser', 'NO' => 'Nokia OSS Browser', 'NV' => 'Nokia Ovi Browser', + 'N2' => 'Norton Secure Browser', 'NX' => 'Nox Browser', 'N1' => 'NOMone VR Browser', 'NE' => 'NetSurf', @@ -596,7 +598,7 @@ class Browser extends AbstractClientParser 'HO', 'A5', 'X1', '18', 'B5', 'B6', 'TC', 'A6', '2X', 'F4', 'YG', 'WR', 'NA', 'DM', '1M', 'A7', 'XN', 'XT', 'XB', 'W1', 'HT', 'B8', 'F5', 'B9', 'WA', 'T0', 'HC', - 'O6', 'P7', 'LJ', 'LC', 'O7', + 'O6', 'P7', 'LJ', 'LC', 'O7', 'N2', 'A8', ], 'Firefox' => [ 'AX', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1', @@ -634,7 +636,7 @@ class Browser extends AbstractClientParser 'O4', 'XO', 'U0', 'B0', 'VA', 'X0', 'A5', 'X1', '18', 'B5', 'B6', 'TC', 'A6', '2X', 'F4', 'YG', 'WR', 'NA', 'DM', '1M', 'A7', 'XN', 'XT', 'XB', 'W1', 'HT', 'B7', - 'B9', 'T0', 'I8', 'O6', 'P7', 'O8', '4B', + 'B9', 'T0', 'I8', 'O6', 'P7', 'O8', '4B', 'A8', ]; /** diff --git a/Tests/Parser/Client/fixtures/browser.yml b/Tests/Parser/Client/fixtures/browser.yml index bee12e88bb..8c581d92f8 100644 --- a/Tests/Parser/Client/fixtures/browser.yml +++ b/Tests/Parser/Client/fixtures/browser.yml @@ -3594,7 +3594,7 @@ user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 AviraScout/47.0.2526.111 client: type: browser - name: Avira Scout + name: Avira Secure Browser version: 47.0.2526.111 engine: Blink engine_version: "47.0.2526.111" @@ -7527,3 +7527,79 @@ family: Chrome headers: http-x-requested-with: com.sec.android.app.sbrowser.lite +- + user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Avira/116.0.0.0 + client: + type: browser + name: Avira Secure Browser + version: 116.0.0.0 + engine: Blink + engine_version: 116.0.0.0 + family: Chrome +- + user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Avira/116.0.0.0 + client: + type: browser + name: Avira Secure Browser + version: 116.0.22144.111 + engine: Blink + engine_version: 116.0.0.0 + family: Chrome + headers: + Sec-CH-UA: '"Chromium";v="116.0.22144.111", "Not)A;Brand";v="24.0.0.0", "Avira Secure Browser";v="116.0.22144.111"' + Sec-CH-UA-Full-Version: "116.0.22144.111" +- + user_agent: Mozilla/5.0 (Linux; Android 13; SAMSUNG SM-A146U) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/23.0 Chrome/115.0.0.0 Mobile Safari/537.36 + client: + type: browser + name: Samsung Browser + version: "23.0" + engine: WebKit + engine_version: "537.36" + family: Chrome + headers: + Sec-CH-UA: '"Not/A)Brand";v="99", "Samsung Internet";v="23.0", "Chromium";v="115"' +- + user_agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 + client: + type: browser + name: Vivaldi + version: 6.1.3035.204 + engine: Blink + engine_version: 114.0.0.0 + family: Chrome + headers: + Sec-CH-UA: '"Not.A/Brand";v="8.0.0.0", "Chromium";v="114.0.5735.245", "Vivaldi";v="6.1.3035.204"' +- + user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Norton/115.0.21984.175 + client: + type: browser + name: Norton Secure Browser + version: 115.0.21984.175 + engine: Blink + engine_version: 115.0.0.0 + family: Chrome + headers: + Sec-CH-UA: '"Not/A)Brand";v="99.0.0.0", "Norton Secure Browser";v="115.0.21984.175", "Chromium";v="115.0.21984.175"' +- + user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Alva/113.0.0.0 Mobile Safari/537.36 + client: + type: browser + name: ALVA + version: 113.0.0.0 + engine: Blink + engine_version: 113.0.0.0 + family: Chrome + headers: + Sec-CH-UA: '"Chromium";v="113.0.5643.0", "Not-A.Brand";v="24.0.0.0"' +- + user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 YaBrowser/23.3.1.895 Yowser/2.5 Safari/537.36 + client: + type: browser + name: Yandex Browser + version: 23.3.1.895 + engine: Blink + engine_version: 110.0.0.0 + family: + headers: + Sec-CH-UA: '"Chromium";v="110.0.5481.208", "Not A(Brand";v="24.0.0.0", "YaBrowser";v="23.3.1.895"' diff --git a/Tests/fixtures/clienthints.yml b/Tests/fixtures/clienthints.yml index b3e89aa419..9ff370b464 100644 --- a/Tests/fixtures/clienthints.yml +++ b/Tests/fixtures/clienthints.yml @@ -1079,3 +1079,30 @@ model: Galaxy A03 Core os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Avira/116.0.0.0 + headers: + Sec-CH-UA: '"Chromium";v="116.0.22144.111", "Not)A;Brand";v="24.0.0.0", "Avira Secure Browser";v="116.0.22144.111"' + Sec-CH-UA-Platform: "Windows" + Sec-CH-UA-Mobile: "?0" + Sec-CH-UA-Full-Version: "116.0.22144.111" + Sec-CH-UA-Platform-Version: "15.0.0" + Sec-CH-UA-Arch: "x86" + Sec-CH-UA-Bitness: '"64"' + Sec-CH-Prefers-Color-Scheme: "dark" + os: + name: Windows + version: "11" + platform: x64 + client: + type: browser + name: Avira Secure Browser + version: 116.0.22144.111 + engine: Blink + engine_version: 116.0.0.0 + device: + type: desktop + brand: "" + model: "" + os_family: Windows + browser_family: Chrome diff --git a/regexes/client/browsers.yml b/regexes/client/browsers.yml index 42f5dfc1c9..0b53bb1412 100644 --- a/regexes/client/browsers.yml +++ b/regexes/client/browsers.yml @@ -5,6 +5,20 @@ # @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later ############### +# ALVA (https://oyealva.com/) +- regex: 'Alva/(\d+\.[\.\d]+)' + name: 'ALVA' + version: '$1' + engine: + default: 'Blink' + +# Norton Secure Browser (https://norton.com/products/norton-secure-browser) +- regex: 'Norton/(\d+\.[\.\d]+)' + name: 'Norton Secure Browser' + version: '$1' + engine: + default: 'Blink' + # Odd Browser (https://play.google.com/store/apps/details?id=com.corproxy.browser) - regex: 'Odd/(\d+\.[\.\d]+)' name: 'Odd Browser' @@ -434,9 +448,9 @@ engine: default: 'Blink' -# Avira Scout (http://www.avira.com/en/avira-scout) -- regex: 'AviraScout/(\d+[\.\d]+)' - name: 'Avira Scout' +# Avira Secure Browser (https://www.avira.com/en/avira-secure-browser) +- regex: 'Avira(?:Scout)?/(\d+[\.\d]+)' + name: 'Avira Secure Browser' version: '$1' engine: default: 'Blink'