Re:Look before you paste from a website to terminal
by gumby on Thursday January 26, 2017 @01:49PM
(#13494081)
> Which seems like it would be pretty stupid for me to press enter. Which if we're talking security it seems to more sane thing to do is not automatically send commands that are pasted in. Zsh being secure and bash not. I feel this is more a developer issue than user.
A triple click selection will copy the whole line including the newline. So a paste will execute it as well.
Re:Look before you paste from a website to terminal
by throwaway2016a on Thursday January 26, 2017 @11:46AM
(#13492876)
It would be better if it was a curl piped to bash. Also, I'd love it if there was a curl at the beginning of this to track stats on how many people run it.
Although I suspect the stats would be poisoned by people doing forensics.
Edit: also, I wonder how many things it would break if browser changed copy to only copy visible text.
ls ; clear; echo 'Haha! You gave me access to your computer with sudo!'; echo -ne 'h4cking ## (10%)\r'; sleep 0.3; echo -ne 'h4cking ### (20%)\r'; sleep 0.3; echo -ne 'h4cking ##### (33%)\r'; sleep 0.3; echo -ne 'h4cking ####### (40%)\r'; sleep 0.3; echo -ne 'h4cking ########## (50%)\r'; sleep 0.3; echo -ne 'h4cking ############# (66%)\r'; sleep 0.3; echo -ne 'h4cking ##################### (99%)\r'; sleep 0.3; echo -ne 'h4cking ####################### (100%)\r'; echo -ne '\n'; echo 'Hacking complete.'; echo 'Use GUI interface using visual basic to track my IP' ls -lat
Which seems like it would be pretty stupid for me to press enter. Which if we're talking security it seems to more sane thing to do is not automatically send commands that are pasted in. Zsh being secure and bash not. I feel this is more a developer issue than user.