Phisherman API - Golang
Installation
Requires Go modules to function
go get github.com/benny-discord/phisherman
Usage
package main
import (
"github.com/benny-discord/phisherman"
)
func main() {
client := phisherman.MakeClient()
}
Check Domain
Check Domain Docs
apiKey := "MY_API_KEY"
data, err := client.CheckDomain("suspicious.test.phisherman.gg", apiKey)
if err != nil {
fmt.Println(err)
}
fmt.Printf("%+v\n", data)
Fetch Domain Info
Fetch Domain Info Docs
apiKey := "MY_API_KEY"
data, err := client.FetchDomainInfo("suspicious.test.phisherman.gg", apiKey)
if err != nil {
fmt.Println(err)
}
fmt.Printf("%+v\n", data)
Reporting a Caught Phish
This is entirely optional, but is used to improve the metrics of the Phisherman API.
More Information
apiKey := "MY_API_KEY"
guildID := 1234567890123456
err := client.ReportCaughtPhish("suspicious.test.phisherman.gg", apiKey, guildID)
if err != nil {
fmt.Println(err)
}
fmt.Println("Success")
Reporting a New Phish
This should be done when you suspect a domain is a phishing domain, but is not listed on Phisherman (this is optional).
More Information
apiKey := "MY_API_KEY"
err := client.ReportCaughtPhish("https://suspicious.test.phisherman.gg/my-full-URL-path", apiKey, guildID)
if err != nil {
fmt.Println(err)
}
fmt.Println("Success")
Bulk Reporting Domains
Docs
body := phisherman_api.BulkReportDomainBody{
"MY_USER_API_KEY": phisherman_api.BulkReportDomainList{
"DOMAIN_TO_REPORT": []int{},
"DOMAIN_TO_REPORT_2": []int{1635591333, 1635591334, 1635591335 },
},
"MY_USER_API_KEY_2": phisherman_api.BulkReportDomainList{
"DOMAIN_TO_REPORT_3": []int{1635591332 },
"DOMAIN_TO_REPORT_4": []int{1635591333, 1635591334 },
},
}
apiKey := "MY_API_KEY"
err := client.BulkReportPhish(body, apiKey)
if err != nil {
fmt.Println(err)
}
fmt.Println("Success")
This endpoint is intended for larger bots who would like to report several domains at once.