enrich

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScannerSubnets = map[string][]string{
	"censys scanner": {
		"162.142.125.0/24",
		"167.94.138.0/24",
		"167.94.145.0/24",
		"167.94.146.0/24",
		"167.248.133.0/24",
	},
	"shadowserver scanner": {
		"64.62.202.96/27",
		"66.220.23.112/29",
		"74.82.47.0/26",
		"184.105.139.64/26",
		"184.105.143.128/26",
		"184.105.247.192/26",
		"216.218.206.64/26",
		"141.212.0.0/16",
	},
	"PAN Expanse scanner": {
		"144.86.173.0/24",
	},
	"rwth scanner": {
		"137.226.113.56/26",
	},
}

ScannerSubnets contains a list of known scanners' subnet. The list is taken from https://github.com/mushorg/glutton.

Functions

This section is empty.

Types

type Config

type Config struct {
	CacheSize int
	CacheTTL  time.Duration
}

Config holds configuration settings for enrichment cache.

type Enricher

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

Enricher represents the default enrichment implementation.

func New

func New(conf Config) *Enricher

New creates a new Enricher instance with the specified configuration.

func (*Enricher) Process

func (e *Enricher) Process(ip string) (*LookupInfo, error)

Process enriches the IP address and stores the result in the enrichment cache.

type LookupInfo

type LookupInfo struct {
	Host         string
	KnownScanner string
}

LookupInfo contains the results of a performed lookup.

Jump to

Keyboard shortcuts

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