News for hackers. Stuff that matters.
Re:Show HN: Inspect questionable scripts before piping them ... by ams6110 on Saturday May 16, 2015 @03:09PM (#9557248)
Why not just:

  curl ... | less
Re:Show HN: Inspect questionable scripts before piping them ... by bbrazil on Saturday May 16, 2015 @03:27PM (#9557304)
One potential issue is that you don't know you'll get the same HTTP response next time.
Re:Show HN: Inspect questionable scripts before piping them ... by ams6110 on Saturday May 16, 2015 @03:43PM (#9557350)
From within less, you can save to a file or pipe to a command, once you've inspected the payload to whatever degree you desire.
Re:Show HN: Inspect questionable scripts before piping them ... by thrownaway122 on Saturday May 16, 2015 @07:11PM (#9557997)
I'm not sure that this is as safe as you may think.

EDIT More info. Yes this is better than curl ... | sh. But less has a lot of functionality (more than you'd expect) and a carefully written script could exploit some of this.

Re:Show HN: Inspect questionable scripts before piping them ... by SmirkingRevenge on Saturday May 16, 2015 @10:42PM (#9558474)
Would that really be any different that downloading the script, then opening it with less/vim/whatever locally, which is typically going to be pretty safe, unless the script is accidentally executed somehow.
Re:Show HN: Inspect questionable scripts before piping them ... by thrownaway122 on Sunday May 17, 2015 @04:33AM (#9559217)
Well it is exactly the same.
Re:Show HN: Inspect questionable scripts before piping them ... by hartator on Saturday May 16, 2015 @10:09PM (#9558401)
Can you provide an example?
Re:Show HN: Inspect questionable scripts before piping them ... by thrownaway122 on Sunday May 17, 2015 @04:39AM (#9559236)
EDIT found link http://seclists.org/fulldisclosure/2014/Nov/74

Basically the tldr is that gnu less is a program that has been engineered to do a lot of things over the years and this has created attack surfaces which mean that if someone was to curl .... | less on a carefully designed payload it could allow the payload to obtain a shell.

I wasn't saying that it isn't safer just that it isn't totally safe.

Re:Show HN: Inspect questionable scripts before piping them ... by SmirkingRevenge on Saturday May 16, 2015 @06:26PM (#9557873)
`curl ... | <your favorite code editor, like vim or emacs> -` should work too.

Thats generally what I do when I encounter the curl -> bash instructions on the web.