403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.217.19
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/usa_sites/governmentgrants.us/vx/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/usa_sites/governmentgrants.us/vx/lib/ua.php
<?
/**
  * /lib/ua.php
  *
  * This file will ofer up device and browser information
  *
  * @copyright 2016-2021 Synergy Pro Marketing
  * @author Aaron Campbell <aaron@synergymentoring.com>
  *	@license None, All Rights Reserved
  * @package Layout
  * @filesource
  */
/**
  * Returns an array of device and browser information parsed from the User Agent string
  *
  * ['userAgent'], ['name'], ['version'], ['platform'], ['pattern'];
  *
  * @param none
  * @return array Returns an array of device and browser information parsed from the User Agent string
  */
if(!function_exists('getUserAgent')) {
function getUserAgent()
{
    $u_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $bname = 'Unknown';
    $platform = 'Unknown';
    $version= "";
    $os_array       =   array(
                            '/windows nt 10/i'     =>  'Windows 10',
                            '/windows nt 6.3/i'     =>  'Windows 8.1',
                            '/windows nt 6.2/i'     =>  'Windows 8',
                            '/windows nt 6.1/i'     =>  'Windows 7',
                            '/windows nt 6.0/i'     =>  'Windows Vista',
                            '/windows nt 5.2/i'     =>  'Windows Server 2003/XP x64',
                            '/windows nt 5.1/i'     =>  'Windows XP',
                            '/windows xp/i'         =>  'Windows XP',
                            '/windows nt 5.0/i'     =>  'Windows 2000',
                            '/windows me/i'         =>  'Windows ME',
                            '/win98/i'              =>  'Windows 98',
                            '/win95/i'              =>  'Windows 95',
                            '/win16/i'              =>  'Windows 3.11',
                            '/macintosh|mac os x/i' =>  'Mac OS X',
                            '/mac_powerpc/i'        =>  'Mac OS 9',
                            '/linux/i'              =>  'Linux',
                            '/ubuntu/i'             =>  'Ubuntu',
                            '/iphone/i'             =>  'iPhone',
                            '/ipod/i'               =>  'iPod',
                            '/ipad/i'               =>  'iPad',
                            '/android/i'            =>  'Android',
                            '/blackberry/i'         =>  'BlackBerry',
                            '/webos/i'              =>  'Mobile',
                            '/CrOS/i'              =>  'Chrome OS',
                        );

    foreach ($os_array as $regex => $value) { 
        if (preg_match($regex, $u_agent)) {
            $platform    =   $value;
        }
    }
	
    if(preg_match('/MSIE/i',$u_agent) && !preg_match('/Opera/i',$u_agent))
    {
        $bname = 'Internet Explorer';
        $ub = "MSIE";
    }
	else if(preg_match('/Edge/i',$u_agent))
    {
        $bname = 'Edge';
        $ub = "Firefox";
    }
	else if(preg_match('/Trident/i',$u_agent))
    {
        $bname = 'Internet Explorer';
        $ub = "Firefox";
    }
    else if(preg_match('/Firefox/i',$u_agent))
    {
        $bname = 'Mozilla Firefox';
        $ub = "Firefox";
    }
    else if(preg_match('/Chrome/i',$u_agent))
    {
        $bname = 'Google Chrome';
        $ub = "Chrome";
    }
    else if(preg_match('/Safari/i',$u_agent))
    {
        $bname = 'Apple Safari';
        $ub = "Safari";
    }
    else if(preg_match('/Opera/i',$u_agent))
    {
        $bname = 'Opera';
        $ub = "Opera";
    }
    else if(preg_match('/Netscape/i',$u_agent))
    {
        $bname = 'Netscape';
        $ub = "Netscape";
    } else
	{
		$bname = 'Unknown';
		$ub = 'Unknown';
	}
    $known = array('Version', $ub, 'other');
    $pattern = '#(?<browser>' . join('|', $known) . ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
    if (!preg_match_all($pattern, $u_agent, $matches))
	{

    }
	$version = '?';
	if(!empty($matches['browser'])) {
		$i = count($matches['browser']);
		if($i != 1)
		{
			if(strripos($u_agent, "Version") < strripos($u_agent,$ub))
			{
				$version = $matches['version'][0];
			}
			else
			{
				$version = $matches['version'][1];
			}
		}
		else
		{
			$version= $matches['version'][0];
		}
	}
    $ua = array(
        'userAgent' => $u_agent,
        'name'      => $bname,
        'version'   => $version,
        'platform'  => $platform,
        'pattern'   => $pattern
    );
    return $ua;
}
}

$ua = array();
$ua = getUserAgent();
if(!function_exists('mobile'))
{
	/**
	  * Returns true if the current device is mobile or desktop
	  *
	  * @param string $useragent A standard user agent string
	  * @return boolean Returns true if a device is mobile and false if it is not
	  */
	function mobile($useragent)
	{
		if (preg_match("/mobile|android|blackberry|iphone|windows phone|tablet|ipad|playbook|opera mini/", strtolower($useragent)))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}

$phone = false;
$scale = 1;
$tablet = false;
$device = "";
$browser = $ua['name'];
$operatingSystem = $ua['platform'];

if(mobile($ua['userAgent']))
{
	if(preg_match('/blackberry/', strtolower($ua['userAgent'])))
	{
		$device = "blackberry";
		$phone = true;
		$tablet = false;
		$scale = 1;
	}
	else if(preg_match('/playbook/', strtolower($ua['userAgent'])))
	{
		$device = "tablet";
		$phone = false;
		$tablet = true;
		$scale = 1;
	}
	else if(preg_match('/tablet/', strtolower($ua['userAgent'])))
	{
		$device = "tablet";
		$phone = false;
		$tablet = true;
		$scale = 1;
	}
	else if(preg_match('/android/', strtolower($ua['userAgent'])))
	{
		$device = "android";
		$phone = true;
		$tablet = false;
		$scale = 1;
	}
	else if(preg_match('/iphone/', strtolower($ua['userAgent'])))
	{
		$device = "iphone";
		$phone = true;
		$tablet = false;
		$scale = 1;
	}
	else if(preg_match('/ipad/', strtolower($ua['userAgent'])))
	{
		$device = "ipad";
		$phone = false;
		$tablet = true;
		$scale = 1;
	}
}
else
{
	$phone = false;
	$mobile = false;
	$device = "desktop";
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit