atb -> etb (escape tar bomb)

This commit is contained in:
Sebastian Tramp 2010-12-25 19:55:20 +01:00
parent dc513b5c70
commit cc4bc5ef2c

View file

@ -23,7 +23,7 @@ tmuxhglog() {
# Escape potential tarbombs # Escape potential tarbombs
# http://www.commandlinefu.com/commands/view/6824/escape-potential-tarbombs # http://www.commandlinefu.com/commands/view/6824/escape-potential-tarbombs
atb() { etb() {
l=$(tar tf $1); l=$(tar tf $1);
if [ $(echo "$l" | wc -l) -eq $(echo "$l" | grep $(echo "$l" | head -n1) | wc -l) ]; if [ $(echo "$l" | wc -l) -eq $(echo "$l" | grep $(echo "$l" | head -n1) | wc -l) ];
then tar xf $1; then tar xf $1;