Copy and pasting from a website to the terminal is very harmful , there are an example hereYou past the following line :ls /some/thing/much/too/long/to/type/ , by pressing Enter the following command will be executed without confirmation:ls /dev/null; clear; echo -n Hello ;whoami|tr -d '\n';echo -e '!\nGotcha!!!\nThis is the first line of your /etc/passwd: ';head -n1 /etc/passwdls /some/thing/much/too/long/to/type/The text editor like vim , nano... can display easily the hidden command.Using a multi user operating system , is that possible to find an additional option , package or configuration file to display the hidden command on the terminal before to be executed ?
Is there an additional option to display hidden command on the terminal?
debian;command line;security;web
The easiest and most portable way to see hidden commands is probably usingcat -vFor instance, I might run cat -v and paste into that terminal to see the nonprinting characters.Further reading:How can I see what my keyboard sends? (ncurses FAQ)