Skip to content

polera/gorbl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gorbl

Real-time Blackhole List (RBL) lookups for Golang.

GoDoc Build Status

Author

James Polera [email protected]

Dependencies

No external dependencies. Uses Go's standard packages

Example

package main

import (
	"encoding/json"
	"fmt"

	"github.com/polera/gorbl"
)

func main() {

	r := gorbl.Lookup("b.barracudacentral.org", "smtp.gmail.com")
	json_res, _ := json.Marshal(r)
	fmt.Printf("%v\n", string(json_res))

	/*
		{
		    "host": "smtp.gmail.com",
		    "list": "b.barracudacentral.org",
		    "results": [
		        {
		            "address": "173.194.206.109",
		            "error": true,
		            "error_type": {
		                "Err": "no such host",
		                "IsTimeout": false,
		                "Name": "109.206.194.173.b.barracudacentral.org",
		                "Server": ""
		            },
		            "listed": false,
		            "text": ""
		        },
		        {
		            "address": "173.194.206.108",
		            "error": true,
		            "error_type": {
		                "Err": "no such host",
		                "IsTimeout": false,
		                "Name": "108.206.194.173.b.barracudacentral.org",
		                "Server": ""
		            },
		            "listed": false,
		            "text": ""
		        }
		    ]
			}
	*/

}

About

Real-time Blackhole List (RBL) lookups for Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages