Earlier quoted context omitted.
Doesn't the browser have a model of which text is visible? It has to. So why not copy out of that model?
What constitues as visible though? There is the obvious non-visible CSS modifiers like display: hidden; - but at what point does an off screen rendered text actually count as hidden? If you were wanting to copy the entire contents of a page, and the browser assumed anything off screen was invisible then you would not be able to copy everything at once when it goes below the fold. Different screen resolutions and devi…
Don't Copy-Paste from Website to Terminal
191–200 of 272 posts
Re: Don't Copy-Paste from Website to Terminal
#192Select the text and right click to copy. The trick is over when the "search google for 'malicious text' comes up instead of the command in chrome.
Re: Don't Copy-Paste from Website to Terminal
#193Earlier quoted context omitted.
Could you please tell me in which directory your ~ directory is and in which directory that directory is?
You either enjoy pointless nitpicking or have entirely missed my point.
It is a little more complicated than that, but the complications do not really affect very much. Last time I installed Debian around 2005 the documentation encouraged me to give /home its own partition, in which case rm -rf / will not get it. But on OS X the default is to put everything in one big partition and I kind get the feeling that Linux has moved that way, too. And even if /home is on its own partition, there are many ways for the malefactor to get /home, e.g., rm -rf /home.
Re: Don't Copy-Paste from Website to Terminal
#194Nicely done! Here's the underlying source: git clone /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! Here'"'"'s the first line of your /etc/passwd: ';head -n1 /etc/passwd git clone git://git.kernel.org/pub/scm/utils/kup/kup.git
I was expecting it to be done with Javascript, which is, afaik, how the horrible websites that tack a URL and a "this quote came from blah" attribution, work. I hate all of this stuff and it is greatly saddening that browser vendors are not protecting us from it. It's like the pop-up-on-click days of old and it must stop. If I select some text and copy it, I am taking a very explicit action. I am giving the computer…
Re: Don't Copy-Paste from Website to Terminal
#195Earlier quoted context omitted.
The browser knows that the text is not visible, because it is the browser which is not displaying it. Yet the browser is choosing to include it in the copy. Why?
It is displaying it, just in a place your eye doesn't happen to see it due to a load of wonky CSS rules. You could probably modify your browser to defeat this trick, but doing so you would run the risk of breaking existing sites and making CSS even more complicated than it already is. And malicious code writers would simply switch up their code to a new trick.
Re: Don't Copy-Paste from Website to Terminal
#196Earlier quoted context omitted.
I would love to use such a thing! I'm bugged with programs I don't use anymore which start on system boot. Even after removing some programs, they just don't go away. A sandboxed environment would be really good to use!
That's just bad administration as even on Windows, you can easily disable them ( msconfig ). With Linux, this isn't even an issue unless you're blindly installing dozens of daemons (which, again, can easily be disabled) as Linux doesn't have hundreds of application launchers that install themselves like Windows does (again, daemons being the exception). The only example I can think of where you might run into problem…
That's a problem systemd is trying very hard to solve.
/sarcasm
SysV init may be old, crufty, and inelegant, but it's reasonably straightforward to parse and troubleshoot manually (and BSD-style rc inits are even more straightforward). Making the bootstrap process nondeterministic strikes me as tremendously unwise.
Re: Don't Copy-Paste from Website to Terminal
#197Earlier quoted context omitted.
I dislike this whole trend. How about we start thinking in terms of leaving the user's default environment, and system, alone, and “installing” software into nice sandboxed areas where we can easily enable/disable it, or delete it with a simple “rm -rf directory/path”
I put all my sensitive files under my home directory. Every subdirectory of my home directory is non-world-accessible, and I have a cron job which chmod's world privileges away from new files and directories that don't match a whitelist of directories I wish to publish (e.g. ~/public_html). I've started giving each application its own user and group, and do the git checkout, compile, and install as that user. (You do…
Re: Don't Copy-Paste from Website to Terminal
#198Earlier quoted context omitted.
You either enjoy pointless nitpicking or have entirely missed my point.
No, he did not: typing rm -rf / into a root shell will delete the OS and your home directory. It is a little more complicated than that, but the complications do not really affect very much. Last time I installed Debian around 2005 the documentation encouraged me to give /home its own partition, in which case rm -rf / will not get it. But on OS X the default is to put everything in one big partition and I kind get th…
They are effectively the same: an unknown script executing "rm -rf ~" with an unprivileged user is going to cause as much grief as root running "rm -rf /".
I couldn't care less that the system is still up if all my data is gone.
Also, I believe “rm -r” traverses mount points.
Re: Don't Copy-Paste from Website to Terminal
#199Earlier quoted context omitted.
That's just bad administration as even on Windows, you can easily disable them ( msconfig ). With Linux, this isn't even an issue unless you're blindly installing dozens of daemons (which, again, can easily be disabled) as Linux doesn't have hundreds of application launchers that install themselves like Windows does (again, daemons being the exception). The only example I can think of where you might run into problem…
> With Linux, this isn't even an issue That's a problem systemd is trying very hard to solve. /sarcasm SysV init may be old, crufty, and inelegant, but it's reasonably straightforward to parse and troubleshoot manually (and BSD-style rc inits are even more straightforward). Making the bootstrap process nondeterministic strikes me as tremendously unwise.
I will probably be proved wrong as systemd matures, but right now it's just not the case.