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
- Host: GitHub
- URL: https://github.com/helixspiral/godnsbl
- Owner: HelixSpiral
- Created: 2020-11-27T15:51:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-13T19:55:58.000Z (about 1 year ago)
- Last Synced: 2025-03-21T10:53:06.790Z (7 months ago)
- Topics: dns, dns-blacklist, dns-filter, dnsbl, dnsbl-checker, dnsbl-lookups, dronebl, filter, golang
- Language: Go
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
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")
```