*/
function HIBP($password_hash)
{
+ if (get_config("hibp") == false)
+ return;
$url = "https://api.pwnedpasswords.com/range/".substr($password_hash,0,5);
$end = substr($password_hash,5);
$ch = curl_init($url);
foreach($data as $dat)
{
$result = explode(":",$dat);
- error_log("Checking $i of $count: ".substr($result[0],0,5)." => ".substr(strtoupper($end), 0,5));
if ($result[0] == strtoupper($end))
{
- error_log("FOUND");
$this->add_meta("hibp", $result[1]);
return;
}