Copy-Paste from Website to Terminal

HackForum

Copy-Paste from Website to Terminal#
info sem:
[link]

Aneb slepě nekopírujte do terminálu příkazy z netu.

<p class="codeblock">
<!-- Oh noes, you found it! -->
git clone
<span style="position: absolute; left: -100px; top: -100px">/dev/null; clear; echo -n "Hello ";whoami|tr -d '\n';echo -e '!\nThat was a bad idea. Don'"'"'t copy code from websites you don'"'"'t trust!<br>Here'"'"'s the first line of your /etc/passwd: ';head -n1 /etc/passwd<br>git clone </span>
[link]
</p>
<p>
Try running this command in your terminal. It's supposed to be harmless,
right? It is harmless, yes, but what happens still isn't what you'd
expect and demonstrates the dangers in doing stuff like that. Mark it
with your mouse, copy it somehow (e.g. using CTRL+C) and paste it into
a terminal. What happens?
</p>


----------
nehádej se, nemá to cenu | osobní blog: [link]
(odpovědět)
mzk | E-mail | Website8.4.2013 15:55

Zpět
Svou ideální brigádu na léto najdete na webu Ideální brigáda
 
 
 

 
BBCode