An open API service indexing awesome lists of open source software.

https://github.com/helixspiral/godnsbl

A simple package for doing dnsbl lookups
https://github.com/helixspiral/godnsbl

dns dns-blacklist dns-filter dnsbl dnsbl-checker dnsbl-lookups dronebl filter golang

Last synced: 4 months ago
JSON representation

A simple package for doing dnsbl lookups

Awesome Lists containing this project

README

          

# README

This is a simple package for doing dronebl lookups that was originally part of an IRC bot written in ~2015. Finally got around to separating this logic out into it's own package.

You can create a new service with:
```go
blService := godnsbl.NewLookupServiceWithConfig("config.yml")
```
or with
```go
blService := godnsbl.NewLookupService()

blService.DnsblListing = append(blService.DnsblListing, godnsbl.Dnsbl{
Name: "DroneBL",
Address: ".dnsbl.dronebl.org",
Reply: map[string]string{
"2": "Test",
},
BlockList: []int{1},
BlockMessage: "Example block msg, your IP is: %IPADDR",
})
```

You can then use the lookup service:
```go
lookup := blService.LookupIP("127.0.0.2")
```