Categories
學習筆記

Bash再次更新 請立刻再次升級

env -i X='() { (a)=>\' bash -c 'echo date' ; cat echo

若運行上述命令并列印出了類似下列的結果 請立刻再次更新你的bash

bash: X: line 1: syntax error near unexpected token `='
bash: X: line 1: `'
bash: error importing function definition for `X'
Sat Sep 2X 0X:5X:47 CST 2014

更新方法不變:
centos(redhat、fedora)版
yum ﹣y update bash

debian(ubuntu)版:
apt-get -y install --only-upgrade bash

此番更新后顯示結果為下方結果

date
cat: echo: No such file or directory

若更新后顯示類似下方結果是正常的 因為echo這個文件目前存在 直接rm ﹣f echo就可以了

date
Fri Sep 2X 0X:5X:42 CST 2014

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.