There's an API[0] that takes a prefix of a hash.

I don't know how to verify what the website does, but I think that in a few minutes I'll be able to put together a CURL call that does what we're hoping the website does.

[0]https://haveibeenpwned.com/API/v3#PwnedPasswords