Created
September 27, 2016 06:28
-
-
Save IndianGuru/7717659f664ea8e30238ab247d858e56 to your computer and use it in GitHub Desktop.
A Go program that uses the pwned.go library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/SatishTalim/pwned" | |
) | |
func main() { | |
var result string | |
// Getting all breaches for an account | |
result = pwned.GetService("satish.talim@gmail.com", "breachedaccount/", "" ) | |
fmt.Println("First request: " + result) | |
// 1500 milliseconds delay | |
time.Sleep(time.Millisecond * 1500) | |
// Getting all breaches for an account, filtered by domain | |
result = pwned.GetService("satish.talim@gmail.com", "breachedaccount/", "adobe.com" ) | |
fmt.Println("\nSecond request " + result) | |
// 1500 milliseconds delay | |
time.Sleep(time.Millisecond * 1500) | |
// Getting all breached sites in the system | |
result = pwned.GetService("", "breaches/", "" ) | |
fmt.Println("\nThird request: " + result) | |
// 1500 milliseconds delay | |
time.Sleep(time.Millisecond * 1500) | |
// Getting all breached sites in the system, filtered by domain | |
result = pwned.GetService("", "breaches/", "adobe.com" ) | |
fmt.Println("\nFourth request: " + result) | |
// 1500 milliseconds delay | |
time.Sleep(time.Millisecond * 1500) | |
// Getting a single breached site | |
result = pwned.GetService("", "breach/", "Adobe" ) | |
fmt.Println("\nFifth request: " + result) | |
// 1500 milliseconds delay | |
time.Sleep(time.Millisecond * 1500) | |
// Getting a single breached site | |
result = pwned.GetService("", "dataclasses/", "" ) | |
fmt.Println("\nSixth request: " + result) | |
// 1500 milliseconds delay | |
time.Sleep(time.Millisecond * 1500) | |
// Getting a single breached site | |
result = pwned.GetService("test@example.com", "pasteaccount/", "" ) | |
// https://blog.golang.org/slices | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment