asnmap

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 16 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCIDR

func GetCIDR(output []Response) []*net.IPNet

func GetFormattedDataInCSV

func GetFormattedDataInCSV(output []Response) [][]string

func GetFormattedDataInJson

func GetFormattedDataInJson(output []Response) []byte

func IdentifyInput

func IdentifyInput(input string) interface{}

func ResolveDomain

func ResolveDomain(domain string, customresolvers ...string) []string

Types

type ASN

type ASN string

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (Client) GetData

func (c Client) GetData(value interface{}, originalValue ...interface{}) []Response

type Domain

type Domain string

type IP

type IP string

type Org

type Org string

type Response

type Response struct {
	FirstIp string
	LastIp  string
	Input   string
	ASN     int
	Country string
	Org     string
}

To model http response from server

type Result

type Result struct {
	Timestamp  string   `json:"timestamp,omitempty" csv:"timestamp"`
	Input      string   `json:"input" csv:"input"`
	ASN        string   `json:"as_number" csv:"as_number"`
	ASN_org    string   `json:"as_name" csv:"as_name"`
	AS_country string   `json:"as_country" csv:"as_country"`
	AS_range   []string `json:"as_range" csv:"as_range"`
}

To model json & csv formatted output

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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