ripego

package module
v0.0.0-...-690d852 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2017 License: GPL-3.0 Imports: 10 Imported by: 0

README

ripego

Build Status

This package detects the coordination center for the IPv4 address and makes IP Whois lookup. Retrieve all informations about IP adress. Supported registries: ripe, arin, apnic, afrinic, lacnic

Install
$ go get github.com/c1982/ripego
Usage
package main

import (
	"fmt"
	"log"
	"ripego"
)

func main() {

	w, err := ripego.IPLookup("178.18.196.250")

	if err != nil {
		log.Fatal(err)
	}

	fmt.Println("Inetnum: " + w.Inetnum)
	fmt.Println("Desc: " + w.Descr)
}

//Output:
//Inetnum: 178.18.192.0 - 178.18.207.255
//Desc: Vargonen Teknoloji ve Bilisim Sanayi Ticaret Anonim Sirketi
Contact

aspsrc@gmail.com

Oğuzhan

Documentation

Overview

Code generated by go generate; DO NOT EDIT. This file was generated by robots at 2017-07-27 01:32:18.072827316 +0200 CEST using data from https://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xml

Code generated by go generate; DO NOT EDIT. This file was generated by robots at 2017-07-27 01:32:18.359465185 +0200 CEST using data from https://www.iana.org/assignments/ipv6-unicast-address-assignments/ipv6-unicast-address-assignments.xml

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Net

type Net struct {
	Name         string `xml:"name"`
	EndAddress   string `xml:"endAddress"`
	StartAddress string `xml:"startAddress"`
	OrgInfo      Org    `xml:"orgRef"`
	LastModified string `xml:"updateDate"`
	Created      string `xml:"registrationDate"`
}

type Org

type Org struct {
	Code string `xml:"handle,attr"`
	Name string `xml:"name,attr"`
}

type WhoisInfo

type WhoisInfo struct {
	Noc          string
	Inetnum      string
	Netname      string
	Descr        string
	Country      string
	Organization string
	AdminC       string
	TechC        string
	MntLower     string
	Status       string
	MntBy        string
	Created      string
	LastModified string
	Source       string
	MntRoutes    string
	Person       WhoisPerson
	Route        WhoisRoute
}

WhoisInfo struct with information on IP address range.

func AfrinicCheck

func AfrinicCheck(search, whoisServer string) (*WhoisInfo, error)

AfrinicCheck function

func ApnicCheck

func ApnicCheck(search, whoisServer string) (*WhoisInfo, error)

func ApnicCheck6

func ApnicCheck6(search, whoisServer string) (*WhoisInfo, error)

func ArinCheck

func ArinCheck(search string, whoisServer string) (*WhoisInfo, error)

func IPLookup

func IPLookup(ipaddr string) (*WhoisInfo, error)

IPLookup function that returns IP information at provider and returns information.

func LacnicCheck

func LacnicCheck(search, whoisServer string) (*WhoisInfo, error)

func RipeCheck4

func RipeCheck4(search, whoisServer string) (*WhoisInfo, error)

func RipeCheck6

func RipeCheck6(search, whoisServer string) (*WhoisInfo, error)

type WhoisPerson

type WhoisPerson struct {
	Name         string
	Address      string
	Phone        string
	AbuseMailbox string
	NicHdl       string
	MntBy        string
	Created      string
	LastModified string
	Source       string
}

WhoisPerson struct for Person information from provider.

type WhoisRoute

type WhoisRoute struct {
	Route        string
	Descr        string
	Origin       string
	MntBy        string
	Created      string
	LastModified string
	Source       string
}

WhoisRoute struct for Route and Network information from provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL