T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : 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
Directory :  /home/gositeme/domains/gocodeme.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/gocodeme.com/public_html/index.php
<?php
// GoCodeMe.com - Proxy to Node.js server
// This file proxies requests to the Node.js server running on port 3000

// Enable error reporting for debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Handle CORS preflight requests
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
    header('Access-Control-Allow-Origin: *');
    header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
    header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With');
    header('Access-Control-Max-Age: 86400');
    http_response_code(200);
    exit;
}

// Set CORS headers for all requests
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With');

$server_url = "http://localhost:3000" . $_SERVER['REQUEST_URI'];

// Get request body for POST/PUT requests
$request_body = '';
if (in_array($_SERVER['REQUEST_METHOD'], ['POST', 'PUT', 'PATCH'])) {
    $request_body = file_get_contents('php://input');
}

// Build headers array
$headers = [
    'Content-Type: ' . ($_SERVER['CONTENT_TYPE'] ?? 'application/json'),
    'User-Agent: ' . ($_SERVER['HTTP_USER_AGENT'] ?? 'GoCodeMe-Proxy'),
    'Accept: ' . ($_SERVER['HTTP_ACCEPT'] ?? '*/*'),
    'Accept-Language: ' . ($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? 'en-US,en;q=0.9'),
    'Accept-Encoding: ' . ($_SERVER['HTTP_ACCEPT_ENCODING'] ?? 'gzip, deflate'),
    'Connection: keep-alive',
    'Cache-Control: no-cache'
];

// Forward Authorization header if present
if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
    $headers[] = 'Authorization: ' . $_SERVER['HTTP_AUTHORIZATION'];
}

// Add Content-Length for POST requests
if (!empty($request_body)) {
    $headers[] = 'Content-Length: ' . strlen($request_body);
}

// Check if Node.js server is running
$context = stream_context_create([
    'http' => [
        'method' => $_SERVER['REQUEST_METHOD'],
        'header' => implode("\r\n", $headers),
        'timeout' => 10,
        'content' => $request_body
    ]
]);

// Try to get response from Node.js server
$response = @file_get_contents($server_url, false, $context);

if ($response === false) {
    // Node.js server is not responding, show error page
    http_response_code(503);
    
    // Log the error for debugging
    error_log("GoCodeMe.com Proxy Error: Could not connect to $server_url");
    error_log("Error: " . error_get_last()['message']);
    
    ?>
    <!DOCTYPE html>
    <html>
    <head>
        <title>GoCodeMe.com - Server Temporarily Unavailable</title>
        <style>
            body { font-family: Arial, sans-serif; background: #0f172a; color: #f8fafc; padding: 50px; }
            .container { max-width: 600px; margin: 0 auto; text-align: center; }
            .error { background: #1e293b; padding: 30px; border-radius: 10px; margin: 20px 0; }
            .btn { background: #6366f1; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; display: inline-block; margin: 10px; }
        </style>
    </head>
    <body>
        <div class="container">
            <h1>🤖 GoCodeMe.com</h1>
            <div class="error">
                <h2>Server Temporarily Unavailable</h2>
                <p>The Node.js server is not responding. Please try:</p>
                <ul style="text-align: left; display: inline-block;">
                    <li>Direct access: <a href="http://gocodeme.com:3000" class="btn">GoCodeMe.com:3000</a></li>
                    <li>Check server status</li>
                    <li>Contact administrator</li>
                </ul>
                <p style="margin-top: 20px; font-size: 12px; color: #94a3b8;">
                    Debug: <?php echo error_get_last()['message']; ?>
                </p>
            </div>
        </div>
    </body>
    </html>
    <?php
    exit;
}

// Forward the response headers
$headers = $http_response_header;
foreach ($headers as $header) {
    if (strpos($header, 'Content-Type:') !== false ||
        strpos($header, 'Content-Length:') !== false ||
        strpos($header, 'Cache-Control:') !== false ||
        strpos($header, 'ETag:') !== false ||
        strpos($header, 'Last-Modified:') !== false ||
        strpos($header, 'Access-Control-Allow-Origin:') !== false ||
        strpos($header, 'Access-Control-Allow-Methods:') !== false ||
        strpos($header, 'Access-Control-Allow-Headers:') !== false) {
        header($header);
    }
}

// Output the response
echo $response;
?> 

CasperSecurity Mini