Skip to content

Commit

Permalink
Adds detection for BizBrowser, Kitt, Ladybird and SkyLeap browsers, L…
Browse files Browse the repository at this point in the history
…ibWeb engine, improves detection for Opera Touch, Quark, Swiftfox, adds detection for httprs, Ameba, CSDN, NAVER Dictionary, BlueMail, Yahoo! Mail (#7635)

* Improves detection for Quark
* Adds detection for SkyLeap
* Adds detection for Yahoo! Mail
* Fix engine for Opera Touch
* Adds detection for BizBrowser
* Adds detection for Kitt
* Adds detection for NAVER Dictionary
* Adds detection for CSDN
* Adds detection for Ameba
* Adds detection for Ladybird and LibWeb+LibJs engine
* Improves detection for eM Client
* Improves detection for Swiftfox
* Adds detection for httprs
* Change LibWeb+LibJs to LibWeb
* Adds detection for BlueMail

---------

Co-authored-by: Tutik Alexsandr <[email protected]>
  • Loading branch information
liviuconcioiu and sanchezzzhak committed Apr 1, 2024
1 parent e99cac2 commit 09c5f93
Show file tree
Hide file tree
Showing 12 changed files with 182 additions and 16 deletions.
7 changes: 6 additions & 1 deletion Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class Browser extends AbstractClientParser
'BE' => 'Beonex',
'B2' => 'Berry Browser',
'BT' => 'Bitchute Browser',
'9B' => 'BizBrowser',
'BH' => 'BlackHawk',
'B0' => 'Bloket',
'BJ' => 'Bunjalloo',
Expand Down Expand Up @@ -335,12 +336,14 @@ class Browser extends AbstractClientParser
'KO' => 'Konqueror',
'KP' => 'Kapiko',
'KN' => 'Kinza',
'K4' => 'Kitt',
'KW' => 'Kiwi',
'KD' => 'Kode Browser',
'KT' => 'KUTO Mini Browser',
'KY' => 'Kylo',
'KZ' => 'Kazehakase',
'LB' => 'Cheetah Browser',
'LD' => 'Ladybird',
'LA' => 'Lagatos Browser',
'GN' => 'Legan Browser',
'LR' => 'Lexi Browser',
Expand Down Expand Up @@ -527,6 +530,7 @@ class Browser extends AbstractClientParser
'SY' => 'Sizzy',
'K3' => 'Skye',
'SK' => 'Skyfire',
'KL' => 'SkyLeap',
'SS' => 'Seraphic Sraf',
'KK' => 'SiteKiosk',
'SL' => 'Sleipnir',
Expand Down Expand Up @@ -692,6 +696,7 @@ class Browser extends AbstractClientParser
'N3', 'GD', 'O9', 'Q3', 'F7', 'K2', 'P5', 'H5', 'V3',
'K3', 'Q4', 'G2', 'R2', 'WX', 'XP', '3I', 'BG', 'R0',
'JO', 'OL', 'GN', 'W4', 'QI', 'E1', 'RI', '8B', '5B',
'K4',
],
'Firefox' => [
'FF', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -735,7 +740,7 @@ class Browser extends AbstractClientParser
'ZR', 'D6', 'F6', 'P3', 'FT', 'A9', 'X2', 'NI', 'FG',
'TH', 'N3', 'GD', 'O9', 'Q3', 'F7', 'K2', 'N4', 'P5',
'H5', 'V3', 'G2', 'BG', 'OL', 'II', 'TL', 'M6', 'Y3',
'M7', 'GN',
'M7', 'GN', 'KL', 'K4',
];

/**
Expand Down
1 change: 1 addition & 0 deletions Parser/Client/Browser/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Engine extends AbstractClientParser
'Servo',
'Goanna',
'EkiohFlow',
'LibWeb',
];

/**
Expand Down
4 changes: 4 additions & 0 deletions Parser/Client/Browser/Engine/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public function parse(): ?array
$engineToken = 'Chrome|Cronet';
}

if ('LibWeb' === $this->engine) {
$engineToken = 'LibWeb\+LibJs';
}

\preg_match(
"~(?:{$engineToken})\s*/?\s*((?(?=\d+\.\d)\d+[.\d]*|\d{1,7}(?=(?:\D|$))))~i",
$this->userAgent,
Expand Down
67 changes: 65 additions & 2 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,8 @@
type: browser
name: Opera Touch
version: "1.10.36"
engine: Blink
engine_version: ""
engine: WebKit
engine_version: "605.1.15"
family: Opera
-
user_agent: Opera/9.80 (J2ME/MIDP; Opera Mini; U; en) Presto/2.12.423 Version/12.16
Expand Down Expand Up @@ -9023,6 +9023,42 @@
engine: WebKit
engine_version: 605.1.15
family:
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X; zh-cn) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/20A362 Quark/5.8.9.1457 Mobile
client:
type: browser
name: Quark
version: "5.8.9.1457"
engine: WebKit
engine_version: "601.1.46"
family: Chrome
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Version/14.8.1 Safari/605.1.15; SkyLeap/1.31.2
client:
type: browser
name: SkyLeap
version: "1.31.2"
engine: WebKit
engine_version: "605.1.15"
family: ""
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12H321 sppm_bizbrowser
client:
type: browser
name: BizBrowser
version: ""
engine: WebKit
engine_version: "600.1.4"
family: ""
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13F69 Safari/9537.53 Kitt/1.3.7/3
client:
type: browser
name: Kitt
version: "1.3.7"
engine: WebKit
engine_version: "601.1.46"
family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/4.5 Chrome/83.0.4103.120 Safari/537.36
client:
Expand All @@ -9034,3 +9070,30 @@
family:
headers:
http-x-requested-with: org.mozilla.tv.firefox
-
user_agent: Mozilla/5.0 (Linux; x86_64) Ladybird/1.0
client:
type: browser
name: Ladybird
version: "1.0"
engine: LibWeb
engine_version: ""
family: ""
-
user_agent: Mozilla/5.0 (SerenityOS; x86_64) LibWeb+LibJS/1.0 Browser/1.0
client:
type: browser
name: Ladybird
version: "1.0"
engine: LibWeb
engine_version: "1.0"
family: ""
-
user_agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3pre) Gecko/20070307 Firefox/2.0.0.3pre (Swiftfox)
client:
type: browser
name: Swiftfox
version: "2.0.0.3"
engine: Gecko
engine_version: "1.8.1.3"
family: Firefox
18 changes: 12 additions & 6 deletions Tests/Parser/Client/fixtures/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
client:
type: library
name: Wget
version:
version: ""
-
user_agent: curl/7.21.0 (i386-redhat-linux-gnu) libcurl/7.21.0 NSS/3.12.10.0 zlib/1.2.5 libidn/1.18 libssh2/1.2.4
client:
Expand Down Expand Up @@ -52,7 +52,7 @@
client:
type: library
name: Python urllib
version:
version: ""
-
user_agent: Java/1.7.0_51
client:
Expand Down Expand Up @@ -244,7 +244,7 @@
client:
type: library
name: uTorrent
version:
version: ""
-
user_agent: aria2/1.33.1
client:
Expand All @@ -262,7 +262,7 @@
client:
type: library
name: uclient-fetch
version:
version: ""
-
user_agent: cpprestsdk/2.8.0
client:
Expand Down Expand Up @@ -310,7 +310,7 @@
client:
type: library
name: Windows HTTP
version:
version: ""
-
user_agent: 'Mozilla/5.0 (compatible; U; AnyEvent-HTTP/2.21; http://software.schmorp.de/pkg/AnyEvent)'
client:
Expand Down Expand Up @@ -346,7 +346,7 @@
client:
type: library
name: fasthttp
version:
version: ""
-
user_agent: python-httpx/0.19.0
client:
Expand Down Expand Up @@ -647,3 +647,9 @@
type: library
name: Electron Fetch
version: "1.0"
-
user_agent: httprs/0.1.0
client:
type: library
name: httprs
version: "0.1.0"
18 changes: 18 additions & 0 deletions Tests/Parser/Client/fixtures/mobile_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1919,3 +1919,21 @@
type: mobile app
name: KPN Veilig
version: 18.5.274904
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_4 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G35 Safari/ NAVER(inapp; naverdicapp; 100; 2.1.1) iphoneVersion/iPhone6s
client:
type: mobile app
name: NAVER Dictionary
version: "2.1.1"
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 CSDNApp/5.7.1(iOS)
client:
type: mobile app
name: CSDN
version: "5.7.1"
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 CaDevice/1.0 (iPhone11,8) CaWebApp/1.0(jpameblo;13.8.0;ja;)
client:
type: mobile app
name: Ameba
version: "13.8.0"
18 changes: 18 additions & 0 deletions Tests/Parser/Client/fixtures/pim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,21 @@
type: pim
name: Mail Master
version: 6.5.3.1210
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 15_3_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B176 YJApp-IOS jp.co.yahoo.ymail/7.4.1
client:
type: pim
name: Yahoo! Mail
version: "7.4.1"
-
user_agent: eMClient/9.3.6041.0
client:
type: pim
name: eM Client
version: "9.3.6041.0"
-
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) BlueMail/0.10.31 Chrome/61.0.3163.100 Electron/2.0.18 Safari/537.36
client:
type: pim
name: BlueMail
version: "0.10.31"
3 changes: 3 additions & 0 deletions regexes/client/browser_engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@

- regex: 'Ekioh(?:Flow)?'
name: 'EkiohFlow'

- regex: 'LibWeb\+LibJs'
name: 'LibWeb'
30 changes: 24 additions & 6 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
###############

# Ladybird (https://www.ladybird.dev/)
- regex: '(?:Ladybird|LibWeb\+LibJS/.*Browser)/(\d+\.[\.\d]+)'
name: 'Ladybird'
version: '$1'
engine:
default: 'LibWeb'

# Kitt (https://github.com/kitt-browser | https://web.archive.org/web/20141014085455/http://www.kitt.com/)
- regex: 'Kitt/(\d+\.[\.\d]+)'
name: 'Kitt'
version: '$1'

# BizBrowser (https://www.sppm.jp/option/bizbrowser/ | https://play.google.com/store/apps/details?id=jp.co.axseed.SppmBizApps.BizBrowser)
- regex: 'sppm_bizbrowser'
name: 'BizBrowser'
version: ''

# SkyLeap (https://sky-leap.jp/)
- regex: 'SkyLeap/(\d+\.[\.\d]+)'
name: 'SkyLeap'
version: '$1'

# MaxBrowser
- regex: 'MaxBrowser/(\d+\.[\.\d]+)'
name: 'MaxBrowser'
Expand Down Expand Up @@ -1822,7 +1844,7 @@
default: 'Gecko'

#Swiftfox
- regex: 'Firefox/(\d+\.[\.\d]+) .*\(Swiftfox\)'
- regex: 'Firefox/(\d+\.[\.\d]+).*\(Swiftfox\)'
name: 'Swiftfox'
version: '$1'
engine:
Expand Down Expand Up @@ -2006,8 +2028,6 @@
- regex: 'OPT/(\d+[\.\d]+)'
name: 'Opera Touch'
version: '$1'
engine:
default: 'Blink'
- regex: 'Opera/(\d+\.[\.\d]+) .*(?<!SymbOS; )Opera Mobi'
name: 'Opera Mobile'
version: '$1'
Expand Down Expand Up @@ -2555,11 +2575,9 @@
version: '$1'

# Quark
- regex: 'Chrome/.+ Quark(?:/(\d+[\.\d]+))?'
- regex: 'Quark(?:/(\d+[\.\d]+))?'
name: 'Quark'
version: '$1'
engine:
default: 'Blink'

# Monument Browser
- regex: 'MonumentBrowser(?:/(\d+[\.\d]+))?'
Expand Down
5 changes: 5 additions & 0 deletions regexes/client/libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,8 @@
name: 'QbHttp'
version: '$1'
url: 'https://github.com/OpenQb/QbHttp'

- regex: 'httprs(?:/(\d+[\.\d]+))?'
name: 'httprs'
version: '$1'
url: 'https://github.com/http-server-rs/http-server'
15 changes: 15 additions & 0 deletions regexes/client/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
###############

# Ameba (https://ameblo.jp/ | https://play.google.com/store/apps/details?id=jp.ameba)
- regex: 'jpameblo;(\d+\.[\.\d]+)'
name: 'Ameba'
version: '$1'

# CSDN (https://apps.apple.com/us/app/csdn-%E6%8A%80%E6%9C%AF%E5%BC%80%E5%8F%91%E8%80%85%E7%A4%BE%E5%8C%BA/id1437086352)
- regex: 'CSDNApp/(\d+\.[\.\d]+)'
name: 'CSDN'
version: '$1'

# Moya (https://play.google.com/store/apps/details?id=nu.bi.moya | https://apps.apple.com/za/app/moya-app-datafree/id1623208355)
- regex: 'binu(?:/(\d+[\.\d]+))?'
name: 'Moya'
Expand All @@ -28,6 +38,11 @@
name: 'Naver'
version: '$1'

# NAVER Dictionary (https://apps.apple.com/us/app/naver-dictionary/id673085116)
- regex: 'NAVER\(inapp; naverdicapp; .+; (\d+[\.\d]+)\)'
name: 'NAVER Dictionary'
version: '$1'

# Soldier
- regex: 'Chrome/Soldier_([\d\.]+)'
name: 'Soldier'
Expand Down
12 changes: 11 additions & 1 deletion regexes/client/pim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,13 @@
name: 'Yahoo Mail'
version: ''

# Yahoo! Mail (https://play.google.com/store/apps/details?id=jp.co.yahoo.android.ymail | https://apps.apple.com/jp/app/yahoo-%E3%83%A1%E3%83%BC%E3%83%AB/id669931877)
- regex: 'jp.co.yahoo.ymail/([\d\.]+)'
name: 'Yahoo! Mail'
version: '$1'

# eM Client (https://emclient.com/)
- regex: 'eM Client/(\d+\.[\.\d]+)'
- regex: 'eM ?Client/(\d+\.[\.\d]+)'
name: 'eM Client'
version: '$1'

Expand All @@ -141,3 +146,8 @@
- regex: 'MailMaster(?:PC)?/(\d+[\.\d]+)'
name: 'Mail Master'
version: '$1'

# BlueMail (https://bluemail.me/)
- regex: 'BlueMail/(\d+[\.\d]+)'
name: 'BlueMail'
version: '$1'

0 comments on commit 09c5f93

Please sign in to comment.