Skip to content

Package dnsbl performs lookups to either the builtin or specified dnsrbl servers. This package attempts to be as lightweight as possible and provide basic capabilities to query dnsrbl servers.

License

TheCreeper/dnsrbl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dnsbl

dnsbl is a library written to help you check if an address is listed on with a dnsrbl. You can either specify a dnsrbl to query or use the builtin list. This package attempts to be as lightweight as possible and provide basic capabilities to query dnsrbl servers.

Examples

Query a single dnsrbl server.

r, err := dnsrbl.Query("zen.spamhaus.org", "google.com")
if err != nil {
	log.Fatal(err)
}

if r.Listed {
	// Do something.
}

Query the builtin list of dnsrbl servers.

results, err := dnsrbl.QueryBuiltin("google.com")
if err != nil {
	log.Fatal(err)
}

for _, result := range results {
	if result.Listed {
		// Do something.
	}
}

About

Package dnsbl performs lookups to either the builtin or specified dnsrbl servers. This package attempts to be as lightweight as possible and provide basic capabilities to query dnsrbl servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages