Permalink
Browse files

Updates user agent detection in client library.

  • Loading branch information...
JB Lebrun
JB Lebrun committed Nov 28, 2018
1 parent a6d397a commit 06ebf9ea0566f59000339800ab981f3f481d0986
@@ -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.47
* @version 1.0.48
* @date Creation: Jun 2007
* @date Modification: Nov 2018
* @copyright 2007 - 2018 CaMykS Team
@@ -294,7 +294,7 @@ function client_getUAInfos($ua=false) {
}
/* check Google */
elseif (preg_match('/ (Nexus|Pixel)( [^ \/;]+)? Build/', $ua, $matches)) {
elseif (preg_match('/ (Nexus|Pixel)( [^\/;]+)?( Build|\))/', $ua, $matches)) {
include_once('clientDevices/Google.php.inc');
$model = $matches[1].(isset($matches[2])?$matches[2]:'');
$infos = array_merge($infos, get_GoogleClientDevice($model));
@@ -337,10 +337,10 @@ function client_getUAInfos($ua=false) {
}
/* check Motorola */
elseif (preg_match('/mot(?:-|orola |o|\-moto)([^ \/;]+)/i', $ua, $matches)) {
elseif (preg_match('/mot(?:-|orola|o|\-moto)([^\/;]+)( Build|\))/i', $ua, $matches)) {
include_once('clientDevices/Motorola.php.inc');
$infos = array_merge($infos, get_MotorolaClientDevice($matches[1]));
} elseif (preg_match('/ (Droid|MB200|RAZR HD|Moto G)/', $ua, $matches)) {
$infos = array_merge($infos, get_MotorolaClientDevice(trim($matches[1])));
} elseif (preg_match('/ (Droid|MB200|RAZR HD)/', $ua, $matches)) {
include_once('clientDevices/Motorola.php.inc');
$infos = array_merge($infos, get_MotorolaClientDevice($matches[1]));
} elseif (preg_match('/XT([0-9]{3,})/', $ua, $matches)) {
@@ -488,7 +488,7 @@ function client_getUAInfos($ua=false) {
} elseif (preg_match('/ (Z?[A-Z][0-9]{3}[C|K|T]{1}L) Build/', $ua, $matches)) {
include_once ('clientDevices/Asus.php.inc');
$infos = array_merge($infos, get_AsusClientDevice(trim($matches[1])));
} elseif (preg_match('/ASUS_([A-Z0-9]+) Build/', $ua, $matches)) {
} elseif (preg_match('/ASUS_([A-Z0-9]+)( Build|\))/', $ua, $matches)) {
include_once ('clientDevices/Asus.php.inc');
$infos = array_merge($infos, get_AsusClientDevice(trim($matches[1])));
}
@@ -1108,7 +1108,7 @@ function client_getUAInfos($ua=false) {
}
/* check Crosscall mobiles */
elseif (preg_match('/(Action|Trekker|Odyssey)(\-|_| )([0-9\ A-Z]+) Build/i', $ua, $matches)) {
elseif (preg_match('/(Action|Trekker|Odyssey)(\-|_| )([0-9\ A-Z]+)( Build|\))/i', $ua, $matches)) {
include_once ('clientDevices/Crosscall.php.inc');
$infos = array_merge($infos, get_CrosscallClientDevice(strtolower($matches[1].'-'.$matches[3])));
}
@@ -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.20
* @version 1.0.21
* @date Creation: May 2018
* @date Modification: Nov 2018
* @copyright 2018 CaMykS Team
@@ -4216,7 +4216,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* The Knowledge AI - unknown bot */
/* The Knowledge AI - unknown bot */
$knownBots['the knowledge ai'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4226,7 +4226,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* CRMNLCrawlAgent - unknown bot */
/* CRMNLCrawlAgent - unknown bot */
$knownBots['crmnlcrawlagent'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4236,7 +4236,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* SOcrawl - unknown bot */
/* SOcrawl - unknown bot */
$knownBots['socrawl'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4246,7 +4246,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* Kerrigan - unknown bot */
/* Kerrigan - unknown bot */
$knownBots['kerrigan'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4256,7 +4256,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* dcrawl - unknown bot */
/* dcrawl - unknown bot */
$knownBots['dcrawl'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4266,7 +4266,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* BUFF library - unknown bot */
/* BUFF library - unknown bot */
$knownBots['buff library'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4276,7 +4276,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* WordupinfoSearch - unknown bot */
/* WordupinfoSearch - unknown bot */
$knownBots['wordupinfosearch'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4286,7 +4286,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* Who.is Bot - unknown bot */
/* Who.is Bot - unknown bot */
$knownBots['who.is bot'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4296,7 +4296,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* HoneyBee Bot - unknown bot */
/* HoneyBee Bot - unknown bot */
$knownBots['honeybee'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4306,7 +4306,7 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* Blackboard Safeassign Bot - unknown bot */
/* Blackboard Safeassign Bot - unknown bot */
$knownBots['blackboard safeassign'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
@@ -4316,6 +4316,16 @@ function _client_getKnownBots() {
'engine_url' => '',
);
/* SIMON SMITH Bot - unknown bot */
$knownBots['simon smith'] = array(
'platform_type' => 'bot',
'platform_format' => 'desktop',
'bot_title' => 'Simon Smith (Unknown bot)',
'bot_url' => 'forensic@evestigator.com.au',
'engine_title' => '',
'engine_url' => '',
);
/* return bot list */
return $knownBots;
}
@@ -4,9 +4,9 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/Alcatel.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.1
* @version 1.0.2
* @date Creation: Apr 2018
* @date Modification: Aug 2018
* @date Modification: Nov 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.
@@ -39,6 +39,7 @@ function get_AlcatelClientDevice($deviceCode='') {
'4032D' => array('platform_model' => 'OneTouch Pop C2', 'platform_year' => 2015),
'4032X' => array('platform_model' => 'OneTouch Pop C2', 'platform_year' => 2015),
'4033X' => array('platform_model' => 'OneTouch Pop C3', 'platform_year' => 2013),
'4034D' => array('platform_model' => 'Pixi 4', 'platform_year' => 2016),
'5015D' => array('platform_model' => 'OneTouch Pop 3', 'platform_year' => 2015),
'5015X' => array('platform_model' => 'OneTouch Pop 3', 'platform_year' => 2015),
'5020X' => array('platform_model' => 'OneTouch M\'Pop', 'platform_year' => 2013),
@@ -4,9 +4,9 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/Asus.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.6
* @version 1.0.7
* @date Creation: Apr 2018
* @date Modification: Sep 2018
* @date Modification: Nov 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.
@@ -62,6 +62,7 @@ function get_AsusClientDevice($deviceCode='') {
'ZS551KL' => array('platform_model' => 'ZenFone 4 Pro', 'platform_year' => 2017),
'ZD552KL' => array('platform_model' => 'ZenFone 4 Selfie Pro', 'platform_year' => 2017),
'ZD553KL' => array('platform_model' => 'ZenFone 4 Selfie', 'platform_year' => 2017),
'Z01MD' => array('platform_model' => 'ZenFone 4 Selfie Pro', 'platform_year' => 2017),
'ZE554KL' => array('platform_model' => 'ZenFone 4', 'platform_year' => 2017),
'ZB501KL' => array('platform_model' => 'ZenFone Live', 'platform_year' => 2017),
'ZS620KL' => array('platform_model' => 'ZenFone 5Z', 'platform_year' => 2017),
@@ -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.3
* @version 1.0.4
* @date Creation: Aug 2018
* @date Modification: Oct 2018
* @date Modification: Nov 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.
@@ -20,13 +20,14 @@
*/
function get_GoogleClientDevice($deviceCode='') {
$deviceList = array(
'Nexus' => array('platform_year' => 2010),
'Nexus 4' => array('platform_year' => 2012),
'Nexus 5' => array('platform_year' => 2013),
'Nexus 5X' => array('platform_year' => 2015),
'Nexus 6P' => array('platform_year' => 2015),
'Pixel 2' => array('platform_year' => 2017),
'Pixel 3' => array('platform_year' => 2018),
'Nexus' => array('platform_year' => 2010),
'Nexus 4' => array('platform_year' => 2012),
'Nexus 5' => array('platform_year' => 2013),
'Nexus 5X' => array('platform_year' => 2015),
'Nexus 6P' => array('platform_year' => 2015),
'Pixel 2' => array('platform_year' => 2017),
'Pixel 2 XL' => array('platform_year' => 2017),
'Pixel 3' => array('platform_year' => 2018),
);
/* Check for returning list */
@@ -4,11 +4,11 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/Motorola.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.2
* @version 1.0.3
* @date Creation: Apr 2018
* @date Modification: Jul 2018
* @date Modification: Nov 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.
*/
@@ -28,9 +28,13 @@ function get_MotorolaClientDevice($deviceCode='') {
'XT1039' => array('platform_model' => 'Moto 4G', 'platform_year' => 2013),
'XT1072' => array('platform_model' => 'Moto G 4G (2nd Gen)', 'platform_year' => 2013),
'XT1092' => array('platform_model' => 'Moto X (2nd Gen)', 'platform_year' => 2014),
'XT1650' => array('platform_model' => 'Moto Z', 'platform_year' => 2016),
'E2(4G-LTE)' => array('platform_model' => 'Moto E (2nd Gen)', 'platform_year' => 2015),
'Moto G' => array('platform_model' => 'Moto G', 'platform_year' => 2013),
'G3' => array('platform_model' => 'Moto G (3rd Gen)', 'platform_year' => 2015),
'G (4)' => array('platform_model' => 'Moto G (4th Gen)', 'platform_year' => 2016),
'x4' => array('platform_model' => 'Moto X4', 'platform_year' => 2017),
'RAZR HD' => array('platform_model' => 'Droid Razr HD', 'platform_year' => 2012),
'Droid' => array('platform_model' => 'Droid', 'platform_year' => 2009),
'MB200' => array('platform_model' => 'Dext', 'platform_year' => 2009),
@@ -55,4 +59,4 @@ function get_MotorolaClientDevice($deviceCode='') {
/* Return result. */
return array_merge($result, $deviceList[$deviceCode]);
}
?>
?>
@@ -4,9 +4,9 @@
* @details Engine / Tool Library
* @file engine/lib/tool/clientDevices/Sony.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.13
* @version 1.0.14
* @date Creation: Apr 2018
* @date Modification: Oct 2018
* @date Modification: Nov 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.
@@ -53,6 +53,7 @@ function get_SonyClientDevice($deviceCode='') {
'F8331' => array('platform_model' => 'Xperia XZ', 'platform_year' => 2016),
'G3121' => array('platform_model' => 'Xperia XA1', 'platform_year' => 2017),
'G3221' => array('platform_model' => 'Xperia XA1 Ultra', 'platform_year' => 2017),
'G3311' => array('platform_model' => 'Xperia L1', 'platform_year' => 2017),
'G3312' => array('platform_model' => 'Xperia L1', 'platform_year' => 2017),
'G8141' => array('platform_model' => 'Xperia XZ Premium', 'platform_year' => 2017),
'G8342' => array('platform_model' => 'Xperia XZ1', 'platform_year' => 2017),

0 comments on commit 06ebf9e

Please sign in to comment.