Skip to content

Commit

Permalink
Adds detection for Arachne
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu committed Mar 23, 2024
1 parent 288a0b5 commit 052ccb8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class Browser extends AbstractClientParser
'AV' => 'Amiga Voyager',
'AW' => 'Amiga Aweb',
'PN' => 'APN Browser',
'6A' => 'Arachne',
'RA' => 'Arc',
'AI' => 'Arvin',
'AK' => 'Ask.com',
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',
'Arachne',
];

/**
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 ('Arachne' === $this->engine) {
$engineToken = 'Arachne\/5\.';
}

\preg_match(
"~(?:{$engineToken})\s*/?\s*((?(?=\d+\.\d)\d+[.\d]*|\d{1,7}(?=(?:\D|$))))~i",
$this->userAgent,
Expand Down
9 changes: 9 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9327,3 +9327,12 @@
engine: Gecko
engine_version: "48.0"
family: ""
-
user_agent: xChaos_Arachne/5.1.95;GPL,387+ (www.glennmcc.org)
client:
type: browser
name: Arachne
version: "1.95"
engine: Arachne
engine_version: "1.95"
family: ""
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: 'xChaos_Arachne'
name: 'Arachne'
5 changes: 5 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
###############

# Arachne (https://www.glennmcc.org/)
- regex: 'xChaos_Arachne/5\.(\d+\.[\.\d]+)'
name: 'Arachne'
version: '$1'

# Weltweitimnetz Browser (https://sourceforge.net/projects/weltweitimnetz/ | https://web.archive.org/web/20111108155328/http://www.weltweitimnetz.de/browser_en.htm)
- regex: 'WeltweitimnetzBrowser/(\d+\.[\.\d]+)'
name: 'Weltweitimnetz Browser'
Expand Down

0 comments on commit 052ccb8

Please sign in to comment.