Don't copy paste from a website to a terminal
21–30 of 257 posts
Re: Don't copy paste from a website to a terminal
#22Re: Don't copy paste from a website to a terminal
#23If only operating systems offered a way to undo changes, then this would be mostly a non-issue.
Re: Don't copy paste from a website to a terminal
#24At the end of the day we have to have trust in others especially in opensource. Everything you incorporate in your apps/sites could be malicious.
Re: Don't copy paste from a website to a terminal
#25 runCb(){ cb; echo -e '\n\nGo on? (y/n)'; read -sn 1 ans; if [ "$ans" = y ]; then eval "`cb`"; else true; fi; } #cb should output the contents of your clipboard
Or another option would be to switch your terminal to editing mode (v in the normal mode of `set -o vi`), paste it there, and do `:wq` to run it.Re: Don't copy paste from a website to a terminal
#26The problem is that there's a lot of software out there that expects you to install it this way - particularly by piping into sh or bash or the like. See also http://www.seancassidy.me/dont-pipe-to-your-shell.html and http://output.chrissnell.com/post/69023793377/stop-piping-cu... and https://www.chef.io/blog/2015/07/16/5-ways-to-deal-with-the-... . There was also a blog out there collecting instances of this, but I…
Re: Don't copy paste from a website to a terminal
#27A good terminal should show you the full pasted text in a confirmation popup before executing it. Also should never accept new lines from a paste. Or rather; if and when the paste contains new lines, it should show a confirmation popup so you know what the hell you're executing.
Re: Don't copy paste from a website to a terminal
#28Try copying the Hello World text in this fiddle and paste it in a text editor:
http://jsfiddle.net/teleclimber/8q6sp5ga/
(Tested in Chrome)
Re: Don't copy paste from a website to a terminal
#29The problem is that there's a lot of software out there that expects you to install it this way - particularly by piping into sh or bash or the like. See also http://www.seancassidy.me/dont-pipe-to-your-shell.html and http://output.chrissnell.com/post/69023793377/stop-piping-cu... and https://www.chef.io/blog/2015/07/16/5-ways-to-deal-with-the-... . There was also a blog out there collecting instances of this, but I…
Re: Don't copy paste from a website to a terminal
#30Is there some firefox addon that will prevent websites from changing what I copy?