3 ms·
Does it matter if it's bad form if every terminal noob does it anyway? An attacker using this vector certainly wouldn't care - so long as the attack works. The
by ImaCake 6y ago
Does it matter if it's bad form if every terminal noob does it anyway? An attacker using this vector certainly wouldn't care - so long as the attack works.
There's definitely a place for poking fun at Unix noobs - I have learnt better tools than cat because of it - but it is not terribly relevant here.
- VBprogrammer 6y agoIt's actually one of the few cases where there is a functional difference between using cat and the alternative. Using less instead wouldn't execute the escape sequences.
- turminal 6y agoUnless the user has less aliased to `less - r` which many users do. I wouldn't be surprised if there existed some obscure distro that ships this alias in the default bashrc
- oblio 6y agoIt's not even a noob thing. I've been using using *NIX for 15+ years and I still don't subscribe to this "useless use of cat" pedantry. Without cat I need to use redirections or find the parameter for each command I use, in order to get things from a file. cat bla | command1 | command2 is much nicer to write and read, much more logical and much easier to modify if needed. "Useless use of cat" is a micro-optimization. Use if you want or need, don't turn it into dogma or even better, newbie shaming (yay for gatekeepers!).