Comment by 0xbadcafebee
6 hours 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
Sure, 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
Agreed. People would rather have a cute looking command to copy than security or reliability