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("
- <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;
- }
- .latar {
- background:#222;
- color:#fff;
- box-shadow:0px 1px 1px rgba(0,0,0,0.1) inset;
- border-radius:5px;
- text-align: center;
- }
- 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('<div class="container"><div class="latar"><center><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></center></div></div>');
- }
- 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('<center><br><h3>Upload Download File</h3><br><hr><br></center>');
- if($_SESSION['username'] == $username) {
- pac('<!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=1024">
- <!-- Bootstrap CSS -->
- <!-- Bootstrap DataTables CSS -->
- <!-- Jquery -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
- <script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
- <!-- Jquery DataTables -->
- <script type="text/javascript" language="javascript" src="http:////cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script>
- <!-- Bootstrap dataTables Javascript -->
- <script type="text/javascript" language="javascript" src="http://cdn.datatables.net/plug-ins/9dcbecd42ad/integration/bootstrap/3/dataTables.bootstrap.js"></script>
- <style>
- body {
- margin:auto;
- background: #191919;
- font-family: "Cabin";
- -webkit-font-smoothing:antialiased;
- font-size: 14px;
- color:#fff;
- text-shadow:0px 0px 0px #343436;
- }
- .kiri {
- text-align: left;
- }
- .kanan {
- text-align: right;
- }
- </style>
- <title>Upload Download File</title>
- <script type"text/javascript">
- var viewMode = getCookie("view-mode");
- if(viewMode == "desktop"){
- viewport.setAttribute("content", "width=1024");
- }else if (viewMode == "mobile"){
- viewport.setAttribute("content", "width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no");
- }
- </script>
- <!-- Panggil Fungsi -->
- <script type="text/javascript" charset="utf-8">
- $(document).ready(function() {
- $(".table-paginate").dataTable();
- } );
- </script>
- </head>
- <body><br><br><br><strong>
- <center><div class="kanan"><a href="?out">./LOGOUT</a><br></div>
- <div class="kiri"><?php
- <br>
- <form enctype="multipart/form-data" action="uploader.php" method="post">
- 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></div>
- </center>
- <br/>
- <div class"container">
- <table class="table table-bordered table-dark table-paginate" cellspacing="0" width="100%"> <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>');
- } else {
- form();
- }
- pac("<br><hr></div></div>");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement