Skip to content

Instantly share code, notes, and snippets.

View tjblackheart's full-sized avatar

tjblackheart tjblackheart

  • Berlin, Germany
View GitHub Profile
package main
import (
"fmt"
"net/http"
"time"
)
type cfg struct {
sites []string
@tjblackheart
tjblackheart / PwnedApi.php
Last active March 9, 2018 13:12
A Symfony form validator which validates against the https://haveibeenpwned.com/passwords Range API. You'll need https://github.com/php-http/HttplugBundle.
<?php
namespace App\Utils;
use Http\Client\Common\HttpMethodsClient;
use Http\Client\Exception as HttpClientException;
use Http\Discovery\HttpClientDiscovery;
use Http\Discovery\MessageFactoryDiscovery;
class PwnedApi