jakewarren / haveibeenpwned

library and cmdline utility for the haveibeenpwned API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

haveibeenpwned

GitHub release CircleCI MIT License Go Report Card PRs Welcome GoDoc

library and cmd-line client for the HIBP API

Install

Option 1: Binary

Download the latest release from https://github.com/jakewarren/haveibeenpwned/releases/latest

Option 2: From source

go get github.com/jakewarren/haveibeenpwned

Usage

❯ haveibeenpwned -h
usage: haveibeenpwned [<flags>] <email>

Un-official API client for haveibeenpwned.com.

Optional flags:
  -h, --help                     Show context-sensitive help (also try --help-long and --help-man).
  -d, --debug                    print debug info
  -f, --filter-date=FILTER-DATE  only print breaches released after specified date
  -s, --silent                   suppress response message, only display results
  -V, --version                  Show application version.

Args:
  <email>  the email address to lookup.

Changes

All notable changes to this project will be documented in the changelog.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Example of using the library

package main

import (

	"fmt"
	"log"
    "github.com/jakewarren/haveibeenpwned/api"

)

func main() {

    // initialize the client with your API token
    client = api.NewClient("abc123")

	breachData,err := client.LookupEmailBreaches("test@example.com")
	
	if err != nil {
		log.Fatal(err)
	}


	for _,breach := range breachData {
		fmt.Printf("Breach: %s\n",breach.Title)
	}
}

Thanks to ❤️

License

MIT © 2018 Jake Warren

About

library and cmdline utility for the haveibeenpwned API

License:MIT License


Languages

Language:Go 93.2%Language:Makefile 6.8%