//this file is obfuscated
error_reporting(0);
require_once "flag.php";
if (isset($_GET['source'])) {
echo "<pre>" . htmlspecialchars(file_get_contents(__INDEX__)). "</pre>";
exit;
}
if (isset($_POST["submit"])) {
if ($_POST["Username"] == "user" && $_POST["Password"] == "1V93N75T1294C12P4XK12") {
echo '<h1 style="text-align: center; margin-top: 20px; font-size: 1.5rem; color: #333;">' . FLAG . '</h1>';
exit;
}
$error_message = "Credentials are incorrect";
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body {
font-family: "Lato", sans-serif;
}
.main-head{
height: 150px;
background: #FFF;
}
.sidenav {
height: 100%;
background-color: #000;
overflow-x: hidden;
padding-top: 20px;
}
.main {
padding: 0px 10px;
}
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
}
@media screen and (max-width: 450px) {
.login-form{
margin-top: 10%;
}
}
@media screen and (min-width: 768px){
.main{
margin-left: 40%;
}
.sidenav{
width: 40%;
position: fixed;
z-index: 1;
top: 0;
left: 0;
}
.login-form{
margin-top: 80%;
}
}
.login-main-text{
margin-top: 20%;
padding: 60px;
color: #fff;
}
.login-main-text h2{
font-weight: 300;
}
.btn-black{
background-color: #000 !important;
color: #fff;
}
.error-alert {
background-color: #f8d7da;
color: #721c24;
padding: 10px;
border: 1px solid #f5c6cb;
border-radius: 5px;
margin-bottom: 15px;
}
</style>
</head>
<body>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<div class="sidenav">
<div class="login-main-text">
<h2>Application<br> Login Page</h2>
<p>Login from here to access.</p>
</div>
</div>
<div class="main">
<div class="col-md-6 col-sm-12">
<div class="login-form">
=($error_message == null?"":'<div id="error-message" class="error-alert"><strong>Error!</strong> ' . $error_message . '!</div>')
<form method="POST">
<div class="form-group">
<label>Username</label>
<input name="username" type="text" class="form-control" placeholder="username">
</div>
<div class="form-group">
<label>Password</label>
<input name="password" type="password" class="form-control" placeholder="password">
</div>
<button name="submit" type="submit" class="btn btn-black">Login</button>
</form>
</div>
</div>
</div>
</div>
</body>
</html>
© 2023 Quttera Ltd. All rights reserved.