From b656f2bf2274df59da4dc0df09bccfad1f28eb94 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Fri, 20 Sep 2024 08:22:20 +0200 Subject: [PATCH] Adds detection for Privacy Pioneer Browser, Mojeek and improves detection for various apps and browsers (#7839) * Adds detection for Mojeek * Improves detection for Telegram * Improves detection for ZTE Browser * Improves detection for Via * Adds detection for Privacy Pioneer Browser --- Parser/Client/Browser.php | 5 +-- Tests/Parser/Client/fixtures/browser.yml | 33 +++++++++++++++++ Tests/Parser/Client/fixtures/mobile_app.yml | 6 ++++ Tests/fixtures/clienthints-app.yml | 39 +++++++++++++++++++++ regexes/client/hints/apps.yml | 2 ++ regexes/client/hints/browsers.yml | 3 ++ regexes/client/mobile_apps.yml | 5 +++ 7 files changed, 91 insertions(+), 2 deletions(-) diff --git a/Parser/Client/Browser.php b/Parser/Client/Browser.php index 67733944b3..ed97db9eb3 100644 --- a/Parser/Client/Browser.php +++ b/Parser/Client/Browser.php @@ -518,6 +518,7 @@ class Browser extends AbstractClientParser 'BP' => 'Privacy Browser', 'PI' => 'PrivacyWall', 'P4' => 'Privacy Explorer Fast Safe', + 'X5' => 'Privacy Pioneer Browser', 'P3' => 'Private Internet Browser', 'P5' => 'Proxy Browser', '7P' => 'Proxyium', @@ -766,7 +767,7 @@ class Browser extends AbstractClientParser 'K4', 'WK', 'T3', 'K5', 'MU', '9P', 'K6', 'VR', 'N9', 'M9', 'F9', '0P', '0A', 'JR', 'D3', 'TK', 'BP', '2F', '2M', 'K7', '1N', '8A', 'H7', 'X3', 'T4', 'X4', '5O', - '8C', '3M', '6I', '2P', 'PU', '7I', + '8C', '3M', '6I', '2P', 'PU', '7I', 'X5', ], 'Firefox' => [ 'FF', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1', @@ -815,7 +816,7 @@ class Browser extends AbstractClientParser 'DP', 'KL', 'K4', 'N6', 'KU', 'WK', 'M8', 'UP', 'ZT', '9P', 'N8', 'VR', 'N9', 'M9', 'F9', '0P', '0A', '2F', '2M', 'K7', '1N', '8A', 'H7', 'X3', 'X4', '5O', '6I', - '7I', + '7I', 'X5', ]; /** diff --git a/Tests/Parser/Client/fixtures/browser.yml b/Tests/Parser/Client/fixtures/browser.yml index 0ebc4deda8..75e83a79c2 100644 --- a/Tests/Parser/Client/fixtures/browser.yml +++ b/Tests/Parser/Client/fixtures/browser.yml @@ -10279,3 +10279,36 @@ family: Chrome headers: http-x-requested-with: com.cloudmosa.puffinCloudBrowser +- + user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36 + client: + type: browser + name: ZTE Browser + version: "" + engine: Blink + engine_version: 127.0.0.0 + family: Chrome + headers: + http-x-requested-with: com.zte.nubrowser +- + user_agent: Mozilla/5.0 (Linux; Android 14; 23076PC4BI Build/UKQ1.230917.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.64 Mobile Safari/537.36 + client: + type: browser + name: Via + version: "" + engine: Blink + engine_version: 127.0.6533.64 + family: Chrome + headers: + http-x-requested-with: mark.viah +- + user_agent: Mozilla/5.0 (Linux; Android 14; SM-A546V Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.134 Mobile Safari/537.36 + client: + type: browser + name: Privacy Pioneer Browser + version: "" + engine: Blink + engine_version: 126.0.6478.134 + family: Chrome + headers: + http-x-requested-with: com.cloaktp.browser diff --git a/Tests/Parser/Client/fixtures/mobile_app.yml b/Tests/Parser/Client/fixtures/mobile_app.yml index 6f3634feb5..c486ba56e2 100644 --- a/Tests/Parser/Client/fixtures/mobile_app.yml +++ b/Tests/Parser/Client/fixtures/mobile_app.yml @@ -2141,3 +2141,9 @@ type: mobile app name: The Crossword version: 5.5.0 +- + user_agent: mojeek-app + client: + type: mobile app + name: Mojeek + version: "" diff --git a/Tests/fixtures/clienthints-app.yml b/Tests/fixtures/clienthints-app.yml index 2c8c6cb942..263d234a06 100644 --- a/Tests/fixtures/clienthints-app.yml +++ b/Tests/fixtures/clienthints-app.yml @@ -2804,3 +2804,42 @@ model: Galaxy Tab A7 10.4" (2020) WiFi os_family: Android browser_family: Unknown +- + user_agent: mojeek-app + headers: + Sec-CH-UA: '"Chromium";v="128", "Not;A=Brand";v="24", "Android WebView";v="128"' + Sec-CH-UA-Platform: "Android" + Sec-CH-UA-Mobile: "?1" + http-x-requested-with: mojeek.app + os: + name: Android + version: "" + platform: "" + client: + type: mobile app + name: Mojeek + version: "" + device: + type: "" + brand: "" + model: "" + os_family: Android + browser_family: Unknown +- + user_agent: Mozilla/5.0 (Linux; Android 14; K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36 + headers: + http-x-requested-with: org.telegram.messenger.web + os: + name: Android + version: "14" + platform: "" + client: + type: mobile app + name: Telegram + version: "" + device: + type: smartphone + brand: "" + model: "" + os_family: Android + browser_family: Unknown diff --git a/regexes/client/hints/apps.yml b/regexes/client/hints/apps.yml index dad15ae89c..0ca22ded33 100644 --- a/regexes/client/hints/apps.yml +++ b/regexes/client/hints/apps.yml @@ -1,6 +1,7 @@ # Apps 'org.telegram.messenger': 'Telegram' +'org.telegram.messenger.web': 'Telegram' 'com.snapchat.android': 'Snapchat' 'info.sunista.app': 'Sanista Persian Instagram' 'com.instapro.app': 'InstaPro' @@ -146,6 +147,7 @@ 'com.nytimes.crossword': 'The Crossword' 'castify.roku': 'Castify' 'com.castify': 'Castify' +'mojeek.app': 'Mojeek' # Vpns 'org.torproject.android': 'Orbot' diff --git a/regexes/client/hints/browsers.yml b/regexes/client/hints/browsers.yml index 496d80a27e..20ccd5189b 100644 --- a/regexes/client/hints/browsers.yml +++ b/regexes/client/hints/browsers.yml @@ -3,6 +3,7 @@ 'mark.via.gp': 'Via' 'mark.via.gq': 'Via' 'mark.via.pm': 'Via' +'mark.viah': 'Via' 'com.pure.mini.browser': 'Pure Mini Browser' 'pure.lite.browser': 'Pure Lite Browser' 'acr.browser.Hexa': 'Hexa Web Browser' @@ -319,3 +320,5 @@ 'com.metax.browser': 'Open Browser Lite' 'com.getkeepsafe.browser': 'Keepsafe Browser' 'com.hawk.android.browser': 'Hawk Turbo Browser' +'com.zte.nubrowser': 'ZTE Browser' +'com.cloaktp.browser': 'Privacy Pioneer Browser' diff --git a/regexes/client/mobile_apps.yml b/regexes/client/mobile_apps.yml index 237b653b33..d286507393 100644 --- a/regexes/client/mobile_apps.yml +++ b/regexes/client/mobile_apps.yml @@ -2540,6 +2540,11 @@ name: 'The Crossword' version: '$1' +# Mojeek (https://play.google.com/store/apps/details?id=mojeek.app) +- regex: 'mojeek-app' + name: 'Mojeek' + version: '' + # Electron generic apps - regex: ' (?!(?:AppleWebKit|brave|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|Dezor|TweakStyle|Colibri|Polypane|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/' name: '$1'