Permalink
Browse files

Updates user agent detection in client library.

  • Loading branch information...
JB Lebrun
JB Lebrun committed Sep 11, 2018
1 parent b34fd0d commit ec4e7cb227dd53616876dc990ad16739b1a3cf45
@@ -4,7 +4,7 @@
* @details Engine / Tool Library
* @file engine/lib/tool/client.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.32
* @version 1.0.33
* @date Creation: Jun 2007
* @date Modification: Sep 2018
* @copyright 2007 - 2018 CaMykS Team
@@ -1415,7 +1415,7 @@ function client_getUAInfos($ua=false) {
}
/* check Chrome/Safari/Firefox/Explorer compatible browsers, to be tested before usual browsers */
elseif (preg_match('/(YaBrowser|OPR|IceDragon|Dragon|CriOS|Adventurer|Sleipnir|BoBrowser|Dolfin|ChromePlus|Phoenix|Shiretoko|NS8|MiuiBrowser|SamsungBrowser\/CrossApp|SamsungBrowser|Vivaldi|Qt|Iceweasel|Puffin|Firebird|FBAV|app-ipad-CoteMaison|QQBrowser|PaleMoon|Arora|Edge|Cheshire|MicroMessenger|Getter|Dooble|amaya|Roccat|QupZilla|MMS|Iron|ACHEETAHI|OPiOS|Beonex|LibertyBrowser|LinkedIn|SeaMonkey|Cyberfox|Focus|Fennec|K-Meleon|CoolNovo|QuickLook|GSA|Electron|NG|FxiOS|Lotus-Notes|Chimera|Epiphany|Iridium|HeadlessChrome|QwantiOS|Blazer|TenFourFox|Silk|SailfishBrowser|coc_coc_browser|MZBrowser)\/([a-z0-9\._]*)?/i', $ua, $matches)) {
elseif (preg_match('/(YaBrowser|OPR|IceDragon|Dragon|CriOS|Adventurer|Sleipnir|BoBrowser|Dolfin|ChromePlus|Phoenix|Shiretoko|NS8|MiuiBrowser|SamsungBrowser\/CrossApp|SamsungBrowser|Vivaldi|Qt|Iceweasel|Puffin|Firebird|FBAV|app-ipad-CoteMaison|QQBrowser|PaleMoon|Arora|Edge|Cheshire|MicroMessenger|Getter|Dooble|amaya|Roccat|QupZilla|MMS|Iron|ACHEETAHI|OPiOS|Beonex|LibertyBrowser|LinkedIn|SeaMonkey|Cyberfox|Focus|Fennec|K-Meleon|CoolNovo|QuickLook|GSA|Electron|NG|FxiOS|Lotus-Notes|Chimera|Epiphany|Iridium|HeadlessChrome|QwantiOS|Blazer|TenFourFox|Silk|SailfishBrowser|coc_coc_browser|MZBrowser|2345Explorer)\/([a-z0-9\._]*)?/i', $ua, $matches)) {
$rep = array('OPR'=>'Opera', 'CriOS'=>'Chrome', 'Dragon'=>'IceDragon', 'NS8'=>'Netscape', 'Firebird'=>'Thunderbird', 'FBAV'=>'Facebook App', 'app-ipad-CoteMaison'=>'C&ocirc;t&eacute; Maison App', 'amaya'=>'Amaya', 'MMS'=>'Opera Neon', 'ACHEETAHI'=>'CM Browser', 'OPiOS'=>'Opera mini', 'Focus'=>'Firefox Focus', 'GSA'=>'Google Search App', 'NG'=>'Browser NG', 'FxiOS'=>'Firefox', 'Lotus-Notes'=>'Lotus Notes', 'QwantiOS'=>'Qwant', 'Blazer'=> 'Palm Blazer', 'MicroMessenger' => 'WeChat', 'SailfishBrowser' => 'Sailfish Browser', 'coc_coc_browser'=>'C&ocirc;c c&ocirc;c', 'MZBrowser' => 'Meizu Browser');
$infos = array_merge($infos, array(
'browser_title' => isset($rep[$matches[1]])?$rep[$matches[1]]:$matches[1],
@@ -2188,17 +2188,17 @@ function _client_getUAPropertiesMaxVersions() {
return array(
'system' => array(
'Mac OS X' => '10.15.0', // current is 10.13.x
'iOS' => '13', // current is 11.x
'Android' => '10', // current is 8.x.x
'iOS' => '14', // current is 12.x (beta)
'Android' => '11', // current is 9.x.x
),
'browser' => array(
'Firefox' => '64', // current is 61
'Chrome' => '71', // current is 69
'Chromium' => '71', // current is 69
'Firefox' => '65', // current is 62
'Chrome' => '72', // current is 69
'Chromium' => '72', // current is 69
'Internet Explorer' => '11.0.50', // latest
'Edge' => '45', // current is 40
'Opera' => '58', // current is 55
'Safari' => '14', // current is 11
'Safari' => '15', // current is 12 (beta)
),
);
}
@@ -4,7 +4,7 @@
* @details Engine / Bot Library
* @file engine/lib/tool/clientBots/Bots.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.14
* @version 1.0.15
* @date Creation: May 2018
* @date Modification: Sep 2018
* @copyright 2018 CaMykS Team
@@ -3974,6 +3974,16 @@ function _client_getKnownBots() {
'engine_url' => 'http://www.seekport.com',
);
/* Qirina Hurdler */
$knownBots['qirina hurdler'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
'bot_title' => 'Qirina Hurdler',
'bot_url' => 'http://www.qirina.com/hurdler.html',
'engine_title' => 'Qirina',
'engine_url' => 'http://www.qirina.com/',
);
/* unknown bots */
/* SEOBulls - unknown bot */
@@ -4,9 +4,9 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientBots/Generics.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.4
* @version 1.0.5
* @date Creation: May 2018
* @date Modification: Jul 2018
* @date Modification: Sep 2018
* @copyright 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -601,6 +601,16 @@ function _client_getKnownGenerics() {
'engine_url' => '',
);
/* akka-http */
$knownGenerics['akka-http'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
'bot_title' => 'akka-http',
'bot_url' => '',
'engine_title' => 'akka',
'engine_url' => 'https://akka.io/',
);
/* obot */
$knownGenerics[' obot'] = array(
'platform_type' => 'bot',
@@ -4,11 +4,11 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientBots/Hacks.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.1
* @version 1.0.2
* @date Creation: May 2018
* @date Modification: Jun 2018
* @date Modification: Sep 2018
* @copyright 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* @warning This library is not loaded with CaMykS initialisation.
*/
@@ -20,80 +20,86 @@
*/
function _client_getKnownHacks() {
$knownHacks = array();
/* Joomla Exploit */
$knownHacks['jdatabasedrivermysqli'] = array(
'platform_type' => 'hack',
'hack_info' => 'Joomla Exploit',
);
/* Joomla Exploit */
$knownHacks['bot/0.1 (bot for jce)'] = array(
'platform_type' => 'hack',
'hack_info' => 'Joomla JCE Exploit',
);
/* Bash Exploit */
$knownHacks['() { foo;};echo; /bin/bash'] = array(
'platform_type' => 'hack',
'hack_info' => 'Bash Exploit',
);
/* Bash Exploit */
$knownHacks['() { :; }; echo'] = array(
'platform_type' => 'hack',
'hack_info' => 'Bash Exploit',
);
/* Bash Exploit */
$knownHacks['() { :;};'] = array(
'platform_type' => 'hack',
'hack_info' => 'Bash Exploit',
);
/* Drupal Fckeditor exploit */
$knownHacks['webfuck v2.1 t0phackteam www.t0p.xyz'] = array(
'platform_type' => 'hack',
'hack_info' => 'Drupal Fckeditor exploit',
);
/* betaBot : should be in bot list with a trustee level to "unwanted" */
$knownHacks['betabot'] = array(
'platform_type' => 'hack',
'hack_info' => 'Unwanted bot',
);
/* PHP Exploit */
$knownHacks['php system'] = array(
'platform_type' => 'hack',
'hack_info' => 'PHP Exploit',
);
/* PHP Exploit */
$knownHacks['<'.'?'.'php'] = array(
'platform_type' => 'hack',
'hack_info' => 'PHP Exploit',
);
/* PHP Exploit */
$knownHacks['<'.'?'.'='] = array(
'platform_type' => 'hack',
'hack_info' => 'PHP Exploit',
);
/* PHP Exploit */
$knownHacks['{${'] = array(
'platform_type' => 'hack',
'hack_info' => 'PHP Exploit',
);
/* the beast malware */
$knownHacks['the beast'] = array(
'platform_type' => 'hack',
'hack_info' => 'the beast malware',
);
/* unknown hack */
$knownHacks['ua.tools.random'] = array(
'platform_type' => 'hack',
'hack_info' => 'Unknown hack',
);
/* return list */
return $knownHacks;
}
?>
?>
@@ -4,9 +4,9 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/Google.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0
* @version 1.0.1
* @date Creation: Aug 2018
* @date Modification: Aug 2018
* @date Modification: Sep 2018
* @copyright 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -21,7 +21,7 @@
function get_GoogleClientDevice($deviceCode='') {
$deviceList = array(
'Nexus' => array('platform_year' => 2010),
'Nexus 5X' => array('platform_year' => 2015),
'Pixel 2' => array('platform_year' => 2017),
'Pixel 3' => array('platform_year' => 2018),
);
@@ -4,9 +4,9 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/Huawei.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.11
* @version 1.0.12
* @date Creation: Apr 2018
* @date Modification: Aug 2018
* @date Modification: Sep 2018
* @copyright 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -77,6 +77,7 @@ function get_HuaweiClientDevice($deviceCode='') {
'Y520-U22' => array('platform_model' => 'Ascend Y520', 'platform_year' => 2014),
'Y600-U151' => array('platform_model' => 'Ascend Y600', 'platform_year' => 2014),
'Y360-U03' => array('platform_model' => 'Y3', 'platform_year' => 2015),
'Y635-L21' => array('platform_model' => 'Y635', 'platform_year' => 2015),
'CUN-L21' => array('platform_model' => 'Y5', 'platform_year' => 2016),
'CUN-L03' => array('platform_model' => 'Y5 II', 'platform_year' => 2016),
'SCL-L01' => array('platform_model' => 'Y6', 'platform_year' => 2015),
@@ -4,11 +4,11 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/LG.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.2
* @version 1.0.3
* @date Creation: Apr 2018
* @date Modification: Jun 2018
* @date Modification: Sep 2018
* @copyright 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* @warning This library is not loaded with CaMykS initialisation.
*/
@@ -30,6 +30,7 @@ function get_LGClientDevice($deviceCode='') {
'D722' => array('platform_model' => 'G3 S', 'platform_year' => 2014),
'D802' => array('platform_model' => 'Nexus 5', 'platform_year' => 2013),
'D821' => array('platform_model' => 'G2', 'platform_year' => 2013),
'D852' => array('platform_model' => 'G3', 'platform_year' => 2014),
'D855' => array('platform_model' => 'G3', 'platform_year' => 2014),
'D855' => array('platform_model' => 'G Flex', 'platform_year' => 2014),
'E410' => array('platform_model' => 'Optimus L1 II', 'platform_year' => 2013),
@@ -68,4 +69,4 @@ function get_LGClientDevice($deviceCode='') {
/* Return result. */
return array_merge($result, $deviceList[$deviceCode]);
}
?>
?>
@@ -4,7 +4,7 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/Sony.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.8
* @version 1.0.9
* @date Creation: Apr 2018
* @date Modification: Sep 2018
* @copyright 2018 CaMykS Team
@@ -48,7 +48,9 @@ function get_SonyClientDevice($deviceCode='') {
'G3121' => array('platform_model' => 'Xperia XA1', 'platform_year' => 2017),
'G8141' => array('platform_model' => 'Xperia XZ Premium', 'platform_year' => 2017),
'H3311' => array('platform_model' => 'Xperia L2', 'platform_year' => 2018),
'H3113' => array('platform_model' => 'Xperia XA2', 'platform_year' => 2018),
'H4113' => array('platform_model' => 'Xperia XA2', 'platform_year' => 2018),
'H8314' => array('platform_model' => 'Xperia XZ2', 'platform_year' => 2018),
'SOV31' => array('platform_model' => 'Xperia Z4', 'platform_year' => 2015),
'SOV32' => array('platform_model' => 'Xperia Z5', 'platform_year' => 2015),
@@ -4,7 +4,7 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/Xiaomi.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.5
* @version 1.0.6
* @date Creation: May 2018
* @date Modification: Sep 2018
* @copyright 2018 CaMykS Team
@@ -34,6 +34,7 @@ function get_XiaomiClientDevice($deviceCode='') {
'redmi note 3' => array('platform_model' => 'Redmi Note 3', 'platform_year' => 2015),
'redmi note 4' => array('platform_model' => 'Redmi Note 4', 'platform_year' => 2016),
'redmi note 4x' => array('platform_model' => 'Redmi Note 4X', 'platform_year' => 2017),
'redmi note 5' => array('platform_model' => 'Redmi Note 5', 'platform_year' => 2018),
'redmi 5a' => array('platform_model' => 'Redmi 5A', 'platform_year' => 2017),
'redmi 5 plus' => array('platform_model' => 'Redmi 5 Plus', 'platform_year' => 2018),
);

0 comments on commit ec4e7cb

Please sign in to comment.