Live data from Hacker News

Don't copy paste from a website to a terminal

thejh.net

151–160 of 257 posts

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

#152

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…

Not sure you will anything more than anecdotal evidence but the propensity of people I've interviewed to go to a site like Stack Overflow and cut/paste "solutions" into their shell or terminal is sadly quite large. I much prefer people who can internalize the core knowledge of their craft over those who are living with all their technical knowlege currently swapped out to the web.

If you'd be capable of injecting this sort of trick into stackoverflow that would be news. It's all about the source...

And truth be told, I have used stackoverflow to look up things, even things that I knew before but somehow lost due to inactivity, a lack of RAM refresh so to speak. I'm not ashamed of that and the IT field is now so incredibly broad that I don't feel that I'm the exception there, it's very hard to keep all of the moving parts of a webstack in your head and even harder to keep up when the platforms are changing right underneath you.

And yet I don't feel as if I fall under the 'guy that hasn't internalized the core knowledge of our craft' rule :)

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

#153

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…

The title of this piece should be "check out this cool trick I learned." Then it could have been a quarter the length and wouldn't have had to have been couched with all the motherly scolding.

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

#154

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…

Not sure you will anything more than anecdotal evidence but the propensity of people I've interviewed to go to a site like Stack Overflow and cut/paste "solutions" into their shell or terminal is sadly quite large. I much prefer people who can internalize the core knowledge of their craft over those who are living with all their technical knowlege currently swapped out to the web.

I think you're wildly underestimating how much "core knowledge" there is in the entire field of computing. You can be a absolute master of several disciplines and still need help when stepping outside that area.

In my experience, this sort of attitude leads to things like people saying "What the hell? Your resume said you knew Linux!" when you fail to know every single quirk of the specific unpopular distro that they're using. Don't be that guy.

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

#155

I never paste anything directly anywhere when copied from a webpage. I first paste it on Notepad to handle any formatting and hidden text. Once pasted on notepad, I copy/paste to the final destination.

Notepad? Sounds like your machine is already infested with malware ;-)

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

#156

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…

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 street (where that old lady on the left of me could pull a knife and stab me any time they wanted) that you have to wonder if the downsides weigh up against the upsides of simply trusting the website you get the information from and getting on with your life

But in all of the scenarios you just mentioned:

1) It's immediately obvious something's very wrong. (Assuming pizza contains poison.)

2) It's very likely the perpetrator will get caught.

3) No one else is left with control over your resources

Trusting a script from a website to the point where you execute it in your terminal could result in someone controlling a rootkit on your machine, without you ever knowing, with little chance of a savvy perpetrator getting caught, and with all of your operating system tools subsequently lying to you about any information you could use to detect the event.

That said, I've trusted such scripts and "gotten on with my life" on several occasions.

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

#157
post #149

Earlier quoted context omitted.

Not sure you will anything more than anecdotal evidence but the propensity of people I've interviewed to go to a site like Stack Overflow and cut/paste "solutions" into their shell or terminal is sadly quite large. I much prefer people who can internalize the core knowledge of their craft over those who are living with all their technical knowlege currently swapped out to the web.

I could never quite get those tar flags right and often have to `man tar`.

https://xkcd.com/1168/

Had to be done.

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

#158
post #145

Earlier quoted context omitted.

Not sure whether this anecdote fits the thread well, but does address "don't copy and paste from a website to, well, anywhere without examining what you just pasted": I was administering a final exam to a programming class. Exam was done on class computers, so with me in the front of the room most of the time I couldn't actually see what everyone was doing (and given the nature of the class, if you cheated it probabl…

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.

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

#159

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…

Not burned in the sense that I executed some hidden commands in the terminal, but I've tried pasting snippets of text in IRC and ended up pasting several lines of text that absolutely did not select.

While this may not be a huge issue in practice, I have no idea what motivates the inclusion of functionality that manipulates the clipboard in the browser. I don't really think that the analogies of anyone swerving on the highway or someone poisoning your pizza apply. It's more like your seat belts were deliberately removed, or someone put arsenic right next to the pizza box just in case anyone would want to poison you.

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

#160
post #90

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…

This is a great point, and something I often wonder about as well. I think it's reasonable to think that only a compromised site or site run by someone with ill-intent would pose any real risk. And in such a scenario, it's going to get out pretty quickly that the site is compromised/dangerous. While this doesn't help that theoretical set of initial victims, it just doesn't feel like a credible risk worthy of too much…

And in such a scenario, it's going to get out pretty quickly that the site is compromised/dangerous.

If a perpetrator is smart, the malicious script is going to be hidden a few invocation layers deep, and will only remain up for short intervals. A naive or stupid perpetrator is going to get caught quickly. But the medium is such that a smart one can hope to evade detection.

Post reply on HN