haveibeenpwned

command module
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2019 License: MIT Imports: 9 Imported by: 0

README

haveibeenpwned

GitHub release 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)
	}
}

License

MIT © 2018 Jake Warren

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL