Skip to content

Instantly share code, notes, and snippets.

@Gunni
Created November 6, 2025 13:59
Show Gist options
  • Select an option

  • Save Gunni/31aa48aafbd103bb7c2d9cda287bbdc4 to your computer and use it in GitHub Desktop.

Select an option

Save Gunni/31aa48aafbd103bb7c2d9cda287bbdc4 to your computer and use it in GitHub Desktop.
Check compromised password oneliner
python3 -c 'import getpass ; import hashlib ; p = hashlib.sha1(getpass.getpass("Password to check: ").encode()).hexdigest().upper() ; print(f"Full hash: {p}\ncurl -s https://api.pwnedpasswords.com/range/{p[:5]} | grep {p[5:]} | grep \":\" || echo -n \"not \" ; echo compromised")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment