3 ms·
t=$(mktemp) && [ -w $t ] && curl foo.sh -o $t && echo "$t lksjdfkljshdkfljhdsklfjhslkdjfhsdlkjfhslkdjhf" | sha256sum -c - && bash $t Uses standard tmp files, m
by 0xbadcafebee 8mo ago
t=$(mktemp) && [ -w $t ] && curl foo.sh -o $t && echo "$t lksjdfkljshdkfljhdsklfjhslkdjfhsdlkjfhslkdjhf" | sha256sum -c - && bash $t
Uses standard tmp files, makes sure it's writable (tmp file creation can fail), checks cryptographic hash before executing
- godelski 8mo agoSure, but now we're not playing code golf. There's much better commands than the ones I wrote but good luck getting people to run them
- 0xbadcafebee 8mo agoAgreed. People would rather have a cute looking command to copy than security or reliability