Skip to content

A simple package for doing dnsbl lookups

Notifications You must be signed in to change notification settings

HelixSpiral/godnsbl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

blService := godnsbl.NewLookupServiceWithConfig("config.yml")

or with

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:

lookup := blService.LookupIP("127.0.0.2")