Look before you paste from a website to terminal

Saturday, January 28, 2017

This is a clever way to tricky you into copying hidden text from command line examples, luckily it's something that iTerm (1) will warning you about when you paste a multi-line string or a string with carriage returns at the end.

Malicious code's color is set to that of the background, it's font size is set to 0, it is moved away from rest of the code and it is made un-selectable (that blue color thing doesn't reveal it); to make sure that it works in all possible OSes, browsers and screen sizes.

Source: Life plus Linux: Look before you paste from a website to terminal

iTerm: iterm2.com