1#!/usr/bin/env python3 2 3import requests 4import hashlib 5 6print("Please enter your password: ") 7password = input() 8hash = hashlib.sha1(password.encode("utf8")).hexdigest().upper() 9head, rest = hash[:5], hash[5:]10r = requests.get("https://api.pwnedpasswords.com/range/%s" % head)11if rest in r.content.decode("utf8"):12 print("Password breached.")13else:14 print("You're good... For now.")