3 ms·
I wish there was a standard way to check a checksum, so that download instructions could just include that in the snippet to copy paste. I wrote a tool that co
by ithkuil 8y ago
I wish there was a standard way to check a checksum, so that download instructions could just include that in the snippet to copy paste.
I wrote a tool that could be used like that but it's useless if its not ubiquitous (https://github.com/mmikulicic/runck https://github.com/mmikulicic/runck)
- pcl 8y agoI've got a similar python script in my collection of scripts: $ curl <url> | pipe-checksum <expected> | bash https://gist.github.com/pcl/64bd2f56695fcf8e1fad51443aab1f1e https://gist.github.com/pcl/64bd2f56695fcf8e1fad51443aab1f1e
- e12e 8y agoSince copy-pasting to the terminal is also unsafe[1], it's not really a solution... At any rate - code-signing doesn't really help if the author is the attacker. [1] http://thejh.net/misc/website-terminal-copy-paste http://thejh.net/misc/website-terminal-copy-paste
- ithkuil 8y agoSure, but that's harder to hide. Any user could paste somewhere where nothing gets executed and the expose the hack attempt. Pipe to bash has the interesting aspect of letting the author inject hacks only to people who are not looking. Anyway, the use case for my runck utility is scripts such as dockefiles or CI automation where I want to download and run installers and I don't want to reduce the bash boilerplate.