Live data from Hacker News

Don't copy paste from a website to a terminal

thejh.net

181–190 of 257 posts

Re: Don't copy paste from a website to a terminal

#181
post #32

Off-topic/meta: "Oh, and it seems that other people wrote a detailed text about this issue in 2008." Well ... yeah. We've known about this. And yes, we need to keep making people aware. I'm also amused by all the young people and their containers: always doing things in a root shell. I'm waiting for that to implode in a few more years. My point here is that maybe it's time we started designing some curricula around t…

[deleted]

Re: Don't copy paste from a website to a terminal

#182

So, ok. Don't copy and paste from a website to a terminal, I get it and I got it the last time that this kind of thing was posted. But if I look around I put so incredibly much trust in total strangers all the time that compared to say ordering a pizza (where the cook could put anything in the food they wanted), driving on the highway (where anybody could swerve any moment if they wanted) and simply walking down the…

It's a different threat model to your other examples though. The pizza guy, the driver, the lady down the street, unless they know you and have something against you, they would want to target you with no apparent motive in your examples. There is plenty of motive to hack random computers by just putting up a malicious website. And people try to do it all the time, and install malware with various degrees of stealth.…

> It's a different threat model to your other examples though. The pizza guy, the driver, the lady down the street, unless they know you and have something against you, they would want to target you with no apparent motive in your examples.

No obvious motive or relationship is needed, especially when mental illness is considered. It could be that some stranger who lives elsewhere is walking down your street and might be looking to mug someone.

Re: Don't copy paste from a website to a terminal

#183

Earlier quoted context omitted.

Do you download binaries? Do you build or install projects you've downloaded? Those have the same risk as curl|sh

With both binaries and curl|sh, trust in the source is a major factor in whether or not you do it. But copying an innocuous-looking terminal command (like `ps | grep`) doesn't seem like it would require trust. I'll absolutely grab a binary or `curl | sh` from slack.com. I won't do it from a forum. But I would copy a terminal command that didn't look like it was doing anything fishy from a forum.

For a long time I had the bash fork bomb without any further explanation as my signature line on /, I'd just about forgotten about it when I got a really angry email from someone telling me that I'd blown up his server and thanks very much for that.

Re: Don't copy paste from a website to a terminal

#187
post #170
post #22

I usually go web --> text editor --> terminal. It's a pain but, it works.

CTRL-X CTRL-E will take you into your editor[1] from the command line, where you can paste away and see/edit if necessary. Once you exit from the editor the commands that were entered will be run. So (if vi): CTRL-X CTRL-E i CTRL-V[2] ESC :wq [1] at least in bash, possibly others. [2] or whatever your paste shortcut is, and then edit if necessary Edit: seems this is also possible for zsh but needs some config first:…

That's a lovely hint, thanks!

Re: Don't copy paste from a website to a terminal

#188

So, ok. Don't copy and paste from a website to a terminal, I get it and I got it the last time that this kind of thing was posted. But if I look around I put so incredibly much trust in total strangers all the time that compared to say ordering a pizza (where the cook could put anything in the food they wanted), driving on the highway (where anybody could swerve any moment if they wanted) and simply walking down the…

Anytime I copy anything from the web, I always paste it in Sublime. Then I would read the text and copy and paste again elsewhere as necessary.

Just me.

Re: Don't copy paste from a website to a terminal

#189

So, ok. Don't copy and paste from a website to a terminal, I get it and I got it the last time that this kind of thing was posted. But if I look around I put so incredibly much trust in total strangers all the time that compared to say ordering a pizza (where the cook could put anything in the food they wanted), driving on the highway (where anybody could swerve any moment if they wanted) and simply walking down the…

[deleted]

Re: Don't copy paste from a website to a terminal

#190
post #158
post #145

Earlier quoted context omitted.

And I thought it was ridiculous when someone had cut and pasted a page from an Oracle manual in response to a set of pre-screening questions for a hiring round, headers included (for a generic SQL question we expected a one sentence answer to). At least that guy didn't pay for it - to my knowledge at least (he did cut and paste most of his answers from various places, though, and got many of them wrong, including an…

Isn't the first place you would go to the Oracle manual? I use stack overflow all the time these days (documentation pages before that existed), not quite cutting and pasting but close enough.

> Isn't the first place you would go to the Oracle manual?

If I knew the answer, or had a decent notion of the answer? Hell no.

Post reply on HN