Skip to content

Instantly share code, notes, and snippets.

@oshinko
Last active December 12, 2021 11:25
Show Gist options
  • Save oshinko/e9865ae50bfde11c6c131525e7093729 to your computer and use it in GitHub Desktop.
Save oshinko/e9865ae50bfde11c6c131525e7093729 to your computer and use it in GitHub Desktop.
One-line hash command in Python
cat $PATH_TO_TARGET | python -c "import sys; import hashlib; print(hashlib.sha256(sys.stdin.buffer.read()).hexdigest())"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment