Is it possible to find the SHA256 hash of a webpage? - Ask Ubuntu
how can find sha256 hash of webpage using linux tools (curl, etc.)?
yeah, can use curl
, sha256sum
in single command, so:
curl www.google.com | sha256sum
which give:
┌─[✗]─[16:51:49]─[kazwolfe@blackhawk] └──> lib $ curl www.google.com | sha256sum % total % received % xferd average speed time time time current dload upload total spent left speed 100 10221 0 10221 0 0 15500 0 --:--:-- --:--:-- --:--:-- 15509 803d9c7538817dd8b44f0f2b3990ced288413a1b5a6d042d4216170b065e432b -
your sha256 sum present down below, long string of hex code gibberish stuff below curl
status output.
this works because curl push website's content known stdout, typically gets shown terminal. however, when use pipe symbol (|
), redirect stdout of 1 program stdin of another. therefore, sha256sum
reading stdin curl command, being used compute sha256 value.
Comments
Post a Comment