Skip to content

Instantly share code, notes, and snippets.

@doctaphred
Last active March 8, 2019 13:49
Show Gist options
  • Save doctaphred/021bea90249f148d91ee85f24f9d4b1a to your computer and use it in GitHub Desktop.
Save doctaphred/021bea90249f148d91ee85f24f9d4b1a 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