Skip to content

Instantly share code, notes, and snippets.

@virtualadrian
Forked from doctaphred/wsh
Created March 8, 2019 13:49
Show Gist options
  • Save virtualadrian/e61bf10108ca5a120b06202e55b9792d to your computer and use it in GitHub Desktop.
Save virtualadrian/e61bf10108ca5a120b06202e55b9792d to your computer and use it in GitHub Desktop.
If you're going to curl to shell, at *least* verify the checksum!
(
script=$(curl -fsSL <INSERT URL HERE>);
checksum=$(echo "$script" | shasum -pa256 | cut -c-64);
test $checksum = <INSERT CHECKSUM HERE> || exit 1;
sh -c "$script";
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment