Documentation
¶
Overview ¶
Package gorbl lets you perform RBL (Real-time Blackhole List - https://en.wikipedia.org/wiki/DNSBL) lookups using Golang
This package takes inspiration from a similar module that I wrote in Python (https://github.com/polera/rblwatch).
gorbl takes a simpler approach: Basic lookup capability is provided by the lib. Unlike in rblwatch, concurrent lookups and the lists to search are left to those using the lib.
JSON annotations on the types are provided as a convenience.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RBLResults ¶
type RBLResults struct {
// List is the RBL that was searched
List string `json:"list"`
// Host is the host or IP that was passed (i.e. smtp.gmail.com)
Host string `json:"host"`
// Results is a slice of Results - one per IP address searched
Results []Result `json:"results"`
}
RBLResults holds the results of the lookup.
func Lookup ¶
func Lookup(rblList string, targetHost string) (r RBLResults)
Lookup performs the search and returns the RBLResults
type Result ¶
type Result struct {
// Address is the IP address that was searched
Address string `json:"address"`
// Listed indicates whether or not the IP was on the RBL
Listed bool `json:"listed"`
// RBL lists sometimes add extra information as a TXT record
// if any info is present, it will be stored here.
Text string `json:"text"`
// Error represents any error that was encountered (DNS timeout, host not
// found, etc.) if any
Error bool `json:"error"`
// ErrorType is the type of error encountered if any
ErrorType error `json:"error_type"`
}
Result holds the individual IP lookup results for each RBL search
Click to show internal directories.
Click to hide internal directories.