https://github.com/ibnaleem/gobreach
A Golang library for BreachDirectory's REST API.
https://github.com/ibnaleem/gobreach
breach-directory breachdirectory cybersecurity golang golang-library golang-package hashcat haveibeenpwned hibp johntheripper password password-hash pentesting redteam
Last synced: 7 months ago
JSON representation
A Golang library for BreachDirectory's REST API.
- Host: GitHub
- URL: https://github.com/ibnaleem/gobreach
- Owner: ibnaleem
- License: gpl-3.0
- Created: 2024-12-09T22:26:32.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-16T20:49:35.000Z (9 months ago)
- Last Synced: 2025-02-08T12:46:17.260Z (8 months ago)
- Topics: breach-directory, breachdirectory, cybersecurity, golang, golang-library, golang-package, hashcat, haveibeenpwned, hibp, johntheripper, password, password-hash, pentesting, redteam
- Language: Go
- Homepage: https://pkg.go.dev/github.com/ibnaleem/gobreach
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoBreach
A Golang library for BreachDirectory's REST API.## Installation
```
$ go get github.com/ibnaleem/gobreach
```
## Usage
Get a valid [API Key](https://rapidapi.com/rohan-patra/api/breachdirectory/)
```go
package mainimport (
"fmt"
"log"
"github.com/ibnaleem/gobreach"
)func main() {
client, err := gobreach.NewBreachDirectoryClient("your-api-key")
if err != nil {
log.Fatal(err)
}email := "example@example.com"
response, err := client.SearchEmail(email)
if err != nil {
log.Fatal(err)
}if response.Found > 0 {
fmt.Printf("Found %d breaches for %s:\n", response.Found, email)
for _, entry := range response.Result {
fmt.Println("Password", entry.Password)
fmt.Println("SHA1", entry.Sha1)
fmt.Println("Source", entry.Sources)
}
} else {
fmt.Printf("No breaches found for %s.\n", email)
}
}
```