News for hackers. Stuff that matters.
Re:Don't copy paste from a website to a terminal by wyldfire on Thursday November 12, 2015 @01:36PM (#10555141)
No, I just put my terminal into a mode where I could see what I pasted without any possibility executing it. If you don't give cat any arguments, it reads from stdin and writes to stdout.

I could have just as easily opened vim/emacs/notepad and done the same, or for that matter, written the contents to an actual file instead of redirecting the contents to /dev/null.

Re:Don't copy paste from a website to a terminal by e12e on Thursday November 12, 2015 @02:52PM (#10555635)
But you could still paste ^d (End-of-file)? Granted, if you paste ^d in the terminal, you'd exit, but one could do this?:

  dangerous-commands \n
  ^d #eof
  dangerous-commmands \n #repeat
(I'm not actually sure if you can paste ^d in general... but I expect you could?)
Re:Don't copy paste from a website to a terminal by wyldfire on Thursday November 12, 2015 @03:50PM (#10556009)
Great point, we've just fired another salvo in an escalating war. The only winning move is not to paste. :)
Re:Don't copy paste from a website to a terminal by vacri on Thursday November 12, 2015 @07:51PM (#10557308)
My dentist won't let me do that :(
Re:Don't copy paste from a website to a terminal by jnbiche on Thursday November 12, 2015 @06:19PM (#10556900)
Cool, I've used cat for years and never realized it would do that if you don't have something actually piping to it. Totally makes sense now.