国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

linux中bash漏洞shell腳本修復

2024-08-27 23:59:34
字體:
來源:轉載
供稿:網友

在網上搜資料找到一個大神寫的shell修復bash漏洞腳本,覺得很不錯,拖到我blog里來共享給大家,腳本內容代碼如下:

  1. #/bin/bash 
  2. #Author Alex Fang. Updates may apply soon. 
  3. clear 
  4. echo "Press anykey to continue..." $anykey ; read anykey 
  5. echo "BBBBBBBBBBBAAAAAAAAAAAAAAAAAAAASSSSSSSSSSSSSSSSSSHHHHHHHHHHHHHHHHHHHH!" 
  6. echo "ShellShockFixer v0.1 by Alex Fang. Liscence: GNU GPLv2" 
  7. echo "######################################################" 
  8. echo "Select on option:" 
  9. echo "1) CentOS" 
  10. echo "2) Debian Wheezy" 
  11. echo "3) Debian Squeeze x64(Provided by Aliyun)" 
  12. echo "4) Debian Squeeze x32(Provided by Aliyun)" 
  13. echo "5) Ubuntu" 
  14. echo "6) OpenSuSE x64(Beta, provided by Aliyun)" 
  15. echo "7) OpenSuSE x32(Beta Aliyun)" 
  16. echo "8) Aliyun Linux x64" 
  17. echo "9) Aliyun Linux x32" 
  18. echo "0) iptables way" 
  19. echo "11) Temporily disable bash through chmod" 
  20. echo "######################################################" 
  21. read x 
  22. if test $x -eq 1; then 
  23.  clear 
  24.  echo "Fixing......" 
  25.  yum clean all 
  26.  yum makecache 
  27.  yum update bash 
  28.  echo "Finished!" 
  29.  
  30. elif test $x -eq 2; then 
  31.   clear 
  32.   echo "Fixing for Debian Wheezy..." 
  33.   apt-get update 
  34.   apt-get -y install --only-upgrade bash 
  35.   echo "Finished!" 
  36. elif test $x -eq 3; then 
  37.   echo "Fixing for Debian Squeeze x64..." 
  38.   wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_amd64.deb &&  dpkg -i bash_4.1-3+deb6u2_amd64.deb   
  39.   echo "Finished!" 
  40.    
  41. elif test $x -eq 4; then 
  42.   echo "Fixing for Debian Squeeze x32..." 
  43.   wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_i386.deb &&  dpkg -i bash_4.1-3+deb6u2_i386.deb  
  44.   echo "Finished!" 
  45.    
  46. elif test $x -eq 5; then 
  47.   echo "Fixing for Ubuntu..." 
  48.   apt-get update 
  49.   apt-get -y install --only-upgrade bash 
  50.   echo "Finished!" 
  51.    
  52. elif test $x -eq 6; then 
  53.   echo "Fixing for OpenSuSE x64" 
  54.   wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.x86_64.rpm && rpm -Uvh bash-4.2-68.4.1.x86_64.rpm  
  55.   echo "Finished!" 
  56.    
  57. elif test $x -eq 7; then 
  58.   echo "Fixing for OpenSuSE x32" 
  59.   wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.i586.rpm && rpm -Uvh bash-4.2-68.4.1.i586.rpm  
  60.  echo "Finished!" 
  61.  
  62. elif test $x -eq 8; then 
  63.   echo "Fixing for Aliyun Linux x64..." 
  64.   wget http://mirrors.aliyun.com/centos/5/updates/x86_64/RPMS/bash-3.2-33.el5_10.4.x86_64.rpm && rpm -Uvh bash-3.2-33.el5_10.4.x86_64.rpm   
  65.   echo "Finished!" 
  66. elif test $x -eq 9; then 
  67.   echo "Fixing for Aliyun Linux x32..." 
  68.   wget http://mirrors.aliyun.com/centos/5/updates/i386/RPMS/bash-3.2-33.el5_10.4.i386.rpm  && rpm -Uvh bash-3.2-33.el5_10.4.i386.rpm  
  69. elif test $x -eq 0; then 
  70.   echo "Deploying iptables rules..." 
  71.   iptables --append INPUT -m string --algo kmp --hex-string '|28 29 20 7B|' --jump DROP 
  72.   iptables using -m string --hex-string '|28 29 20 7B|' 
  73.   echo "Finishing..."  //Vevb.com 
  74.    
  75. elif test $x -eq 11; then 
  76.   echo "Chmod way configuring..." 
  77.   chmod o-x bash 
  78.   echo "Finishing..." 
  79. else 
  80.   echo "Invalid Operation." 
  81.   exit 
  82. fi

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 河间市| 苍梧县| 齐齐哈尔市| 青浦区| 柘城县| 万州区| 昌都县| 香港| 东丰县| 阿鲁科尔沁旗| 麻城市| 宁海县| 南宁市| 安龙县| 清苑县| 花垣县| 北辰区| 长子县| 互助| 金乡县| 富平县| 泰兴市| 旺苍县| 轮台县| 丰台区| 达尔| 阿合奇县| 自治县| 西宁市| 东阿县| 济南市| 连山| 澳门| 开平市| 青铜峡市| 奉新县| 溧阳市| 邢台县| 兴城市| 丹棱县| 稷山县|