News for hackers. Stuff that matters.
Re:curl | sh by LeonidasXIV on Monday November 03, 2014 @10:11AM (#8551104)
Some scripts also detect this and are written so that there is no code executed before the file is not complete. Of course, that's a minority.
Re:curl | sh by michaelmior on Monday November 03, 2014 @10:33AM (#8551246)
Definitely including a checksum and validating that before executing would be ideal.
Re:curl | sh by dTal on Monday November 03, 2014 @04:29PM (#8553649)
To elaborate, this is quite easy: you wrap the entire contents of the script into a function definition, then call the function as the last line.