linux中bash漏洞shell脚本修复

小明SEO博客 小明SEO博客,新时代SEO博客

在网上搜资料找到一个大神写的shell修复bash漏洞脚本,觉得很不错,拖到我blog里来共享给大家,脚本内容代码如下:

  1. #/bin/bash
  2. #AuthorAlexFang.Updatesmayapplysoon.
  3. clear
  4. echo"Pressanykeytocontinue..."$anykey;readanykey
  5. echo"BBBBBBBBBBBAAAAAAAAAAAAAAAAAAAASSSSSSSSSSSSSSSSSSHHHHHHHHHHHHHHHHHHHH!"
  6. echo"ShellShockFixerv0.1byAlexFang.Liscence:GNUGPLv2"
  7. echo"######################################################"
  8. echo"Selectonoption:"
  9. echo"1)CentOS"
  10. echo"2)DebianWheezy"
  11. echo"3)DebianSqueezex64(ProvidedbyAliyun)"
  12. echo"4)DebianSqueezex32(ProvidedbyAliyun)"
  13. echo"5)Ubuntu"
  14. echo"6)OpenSuSEx64(Beta,providedbyAliyun)"
  15. echo"7)OpenSuSEx32(BetaAliyun)"
  16. echo"8)AliyunLinuxx64"
  17. echo"9)AliyunLinuxx32"
  18. echo"0)iptablesway"
  19. echo"11)Temporilydisablebashthroughchmod"
  20. echo"######################################################"
  21. readx
  22. iftest$x-eq1;then
  23. clear
  24. echo"Fixing......"
  25. yumcleanall
  26. yummakecache
  27. yumupdatebash
  28. echo"Finished!"
  29. eliftest$x-eq2;then
  30. clear
  31. echo"FixingforDebianWheezy..."
  32. apt-getupdate
  33. apt-get-yinstall--only-upgradebash
  34. echo"Finished!"
  35. eliftest$x-eq3;then
  36. echo"FixingforDebianSqueezex64..."
  37. wgethttp://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_amd64.deb&&dpkg-ibash_4.1-3+deb6u2_amd64.deb
  38. echo"Finished!"
  39. eliftest$x-eq4;then
  40. echo"FixingforDebianSqueezex32..."
  41. wgethttp://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_i386.deb&&dpkg-ibash_4.1-3+deb6u2_i386.deb
  42. echo"Finished!"
  43. eliftest$x-eq5;then
  44. echo"FixingforUbuntu..."
  45. apt-getupdate
  46. apt-get-yinstall--only-upgradebash
  47. echo"Finished!"
  48. eliftest$x-eq6;then
  49. echo"FixingforOpenSuSEx64"
  50. wgethttp://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.x86_64.rpm&&rpm-Uvhbash-4.2-68.4.1.x86_64.rpm
  51. echo"Finished!"
  52. eliftest$x-eq7;then
  53. echo"FixingforOpenSuSEx32"
  54. wgethttp://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.i586.rpm&&rpm-Uvhbash-4.2-68.4.1.i586.rpm
  55. echo"Finished!"
  56. eliftest$x-eq8;then
  57. echo"FixingforAliyunLinuxx64..."
  58. wgethttp://mirrors.aliyun.com/centos/5/updates/x86_64/RPMS/bash-3.2-33.el5_10.4.x86_64.rpm&&rpm-Uvhbash-3.2-33.el5_10.4.x86_64.rpm
  59. echo"Finished!"
  60. eliftest$x-eq9;then
  61. echo"FixingforAliyunLinuxx32..."
  62. wgethttp://mirrors.aliyun.com/centos/5/updates/i386/RPMS/bash-3.2-33.el5_10.4.i386.rpm&&rpm-Uvhbash-3.2-33.el5_10.4.i386.rpm
  63. eliftest$x-eq0;then
  64. echo"Deployingiptablesrules..."
  65. iptables--appendINPUT-mstring--algokmp--hex-string'|2829207B|'--jumpDROP
  66. iptablesusing-mstring--hex-string'|2829207B|'
  67. echo"Finishing..."//phpfensi.com
  68. eliftest$x-eq11;then
  69. echo"Chmodwayconfiguring..."
  70. chmodo-xbash
  71. echo"Finishing..."
  72. else
  73. echo"InvalidOperation."
  74. exit
  75. fi

相关广告
  • linux中bash漏洞shell脚本修复 linux中bash漏洞shell脚本修复 linux中bash漏洞shell脚本修复
相关阅读

linux中bash漏洞shell脚本修复

2019/10/10 17:45:24 | 谷歌SEO算法 | 云计算