EDIT: I misunderstood it as executing
echo sleep 0.01 >> ~/.bashrc
once instead of adding that line to .bashrc – even though that's exactly what you wrote...The first time it does it once, the second time the statement is there twice so it does it twice, then 4, 8, 16, etc. ?
echo "README: No such file or directory" > README
He was absolutely stumped. I just said, "what if 'cat: flag.txt [...]' is the flag?"
Sure enough. That was actually the flag.
Or vi.
Or basically anything other than ls and cat.
notfound() { echo "$1: $2: No such file or directory"; }
f_cat() { notfound cat "$1"; }
f_ls() { notfound ls "$1"; }
alias cat=f_cat
alias ls=f_ls
:DAnd then why not obfuscate ;)
. <(cat <<'EOF' | base64 -d
bm90Zm91bmQoKSB7IGVjaG8gIiQxOiAkMjogTm8gc3VjaCBmaWxlIG9yIGRpcmVjdG9yeSI7IH0K
Zl9jYXQoKSB7IG5vdGZvdW5kIGNhdCAiJDEiOyB9CmZfbHMoKSB7IG5vdGZvdW5kIGxzICIkMSI7
IH0KYWxpYXMgY2F0PWZfY2F0CmFsaWFzIGxzPWZfbHMK
EOF
) #define else #define while if
Of course it will fail for programs that make use of do..while #define while if
#warning "loop flow control substituted for conditional"...and still have time and money aplenty left for some laughs on the way.