Documentation
¶
Index ¶
- Constants
- Variables
- func AnnotateInputDecode(conf *GlobalConf, inChan <-chan string, outChan chan<- inProcessIP, ...)
- func AnnotateOutputEncode(conf *GlobalConf, inChan <-chan inProcessIP, outChan chan<- string, ...)
- func AnnotateRead(conf *GlobalConf, path string, in chan<- string)
- func AnnotateWorker(conf *GlobalConf, a Annotator, inChan <-chan inProcessIP, ...)
- func AnnotateWrite(path string, out <-chan string, wg *sync.WaitGroup)
- func DoAnnotation(conf *GlobalConf)
- func PerSecondUpdateWorker(filePath string, outChan <-chan string, wg *sync.WaitGroup)
- func RegisterAnnotator(af AnnotatorFactory)
- type ASNLookup
- type Annotator
- type AnnotatorFactory
- type BasePluginConf
- type CensysAnnotator
- type CensysAnnotatorFactory
- func (a *CensysAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *CensysAnnotatorFactory) Close() error
- func (a *CensysAnnotatorFactory) GetWorkers() int
- func (a *CensysAnnotatorFactory) GroupName() string
- func (a *CensysAnnotatorFactory) Initialize(_ *GlobalConf) error
- func (a *CensysAnnotatorFactory) IsEnabled() bool
- func (a *CensysAnnotatorFactory) MakeAnnotator(i int) Annotator
- type CymruAnnotator
- type CymruAnnotatorFactory
- func (a *CymruAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *CymruAnnotatorFactory) Close() error
- func (a *CymruAnnotatorFactory) GetWorkers() int
- func (a *CymruAnnotatorFactory) GroupName() string
- func (a *CymruAnnotatorFactory) Initialize(_ *GlobalConf) error
- func (a *CymruAnnotatorFactory) IsEnabled() bool
- func (a *CymruAnnotatorFactory) MakeAnnotator(i int) Annotator
- type CymruResult
- type GeoIP2Annotator
- type GeoIP2AnnotatorFactory
- func (a *GeoIP2AnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *GeoIP2AnnotatorFactory) Close() error
- func (a *GeoIP2AnnotatorFactory) GetWorkers() int
- func (a *GeoIP2AnnotatorFactory) GroupName() string
- func (a *GeoIP2AnnotatorFactory) Initialize(conf *GlobalConf) error
- func (a *GeoIP2AnnotatorFactory) IsEnabled() bool
- func (a *GeoIP2AnnotatorFactory) MakeAnnotator(i int) Annotator
- type GeoIP2City
- type GeoIP2Country
- type GeoIP2LatLong
- type GeoIP2Output
- type GeoIP2Postal
- type GeoIP2Traits
- type GeoIPASNAnnotator
- type GeoIPASNAnnotatorFactory
- func (fact *GeoIPASNAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (fact *GeoIPASNAnnotatorFactory) Close() error
- func (fact *GeoIPASNAnnotatorFactory) GetWorkers() int
- func (fact *GeoIPASNAnnotatorFactory) GroupName() string
- func (fact *GeoIPASNAnnotatorFactory) Initialize(_ *GlobalConf) error
- func (fact *GeoIPASNAnnotatorFactory) IsEnabled() bool
- func (fact *GeoIPASNAnnotatorFactory) MakeAnnotator(i int) Annotator
- type GeoIPASNOutput
- type GlobalConf
- type GreyNoiseAnnotator
- type GreyNoiseAnnotatorFactory
- func (a *GreyNoiseAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *GreyNoiseAnnotatorFactory) Close() error
- func (a *GreyNoiseAnnotatorFactory) GetWorkers() int
- func (a *GreyNoiseAnnotatorFactory) GroupName() string
- func (a *GreyNoiseAnnotatorFactory) Initialize(_ *GlobalConf) error
- func (a *GreyNoiseAnnotatorFactory) IsEnabled() bool
- func (a *GreyNoiseAnnotatorFactory) MakeAnnotator(i int) Annotator
- type IPInfoAnnotator
- type IPInfoAnnotatorFactory
- func (a *IPInfoAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *IPInfoAnnotatorFactory) Close() error
- func (a *IPInfoAnnotatorFactory) GetWorkers() int
- func (a *IPInfoAnnotatorFactory) GroupName() string
- func (a *IPInfoAnnotatorFactory) Initialize(conf *GlobalConf) (err error)
- func (a *IPInfoAnnotatorFactory) IsEnabled() bool
- func (a *IPInfoAnnotatorFactory) MakeAnnotator(i int) Annotator
- type IPInfoMMDBOutput
- type IPInfoModuleOutput
- type PrefixResult
- type RDAPAnnotator
- type RDAPAnnotatorFactory
- func (a *RDAPAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *RDAPAnnotatorFactory) Close() error
- func (a *RDAPAnnotatorFactory) GetWorkers() int
- func (a *RDAPAnnotatorFactory) GroupName() string
- func (a *RDAPAnnotatorFactory) Initialize(_ *GlobalConf) error
- func (a *RDAPAnnotatorFactory) IsEnabled() bool
- func (a *RDAPAnnotatorFactory) MakeAnnotator(i int) Annotator
- type RDNSAnnotator
- type RDNSAnnotatorFactory
- func (a *RDNSAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *RDNSAnnotatorFactory) Close() error
- func (a *RDNSAnnotatorFactory) GetWorkers() int
- func (a *RDNSAnnotatorFactory) GroupName() string
- func (a *RDNSAnnotatorFactory) Initialize(_ *GlobalConf) error
- func (a *RDNSAnnotatorFactory) IsEnabled() bool
- func (a *RDNSAnnotatorFactory) MakeAnnotator(i int) Annotator
- type RDNSOutput
- type RoutingAnnotator
- type RoutingAnnotatorFactory
- func (a *RoutingAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *RoutingAnnotatorFactory) Close() error
- func (a *RoutingAnnotatorFactory) GetWorkers() int
- func (a *RoutingAnnotatorFactory) GroupName() string
- func (a *RoutingAnnotatorFactory) Initialize(_ *GlobalConf) error
- func (a *RoutingAnnotatorFactory) IsEnabled() bool
- func (a *RoutingAnnotatorFactory) MakeAnnotator(i int) Annotator
- type SpurAnnotator
- type SpurAnnotatorFactory
- func (a *SpurAnnotatorFactory) AddFlags(flags *flag.FlagSet)
- func (a *SpurAnnotatorFactory) Close() error
- func (a *SpurAnnotatorFactory) GetWorkers() int
- func (a *SpurAnnotatorFactory) GroupName() string
- func (a *SpurAnnotatorFactory) Initialize(_ *GlobalConf) error
- func (a *SpurAnnotatorFactory) IsEnabled() bool
- func (a *SpurAnnotatorFactory) MakeAnnotator(i int) Annotator
Constants ¶
const SpurApiUrl = "https://api.spur.us/v2/context/"
Variables ¶
var Annotators []AnnotatorFactory
Functions ¶
func AnnotateInputDecode ¶
func AnnotateInputDecode(conf *GlobalConf, inChan <-chan string, outChan chan<- inProcessIP, wg *sync.WaitGroup, i int)
multiple workers that decode raw lines from AnnotateRead from JSON/CSV into native golang objects
func AnnotateOutputEncode ¶
func AnnotateOutputEncode(conf *GlobalConf, inChan <-chan inProcessIP, outChan chan<- string, wg *sync.WaitGroup, i int)
func AnnotateRead ¶
func AnnotateRead(conf *GlobalConf, path string, in chan<- string)
single worker that reads from file and queues raw lines
func AnnotateWorker ¶
func DoAnnotation ¶
func DoAnnotation(conf *GlobalConf)
func PerSecondUpdateWorker ¶
PerSecondUpdateWorker prints a per-second scan summary as well as a Scan Completed/Aborted msg at the end It writes the updates to the file path provided, or stderr if the file path is empty or "-". For every line of output received on outChan, it counts one IP annotated
func RegisterAnnotator ¶
func RegisterAnnotator(af AnnotatorFactory)
Types ¶
type ASNLookup ¶
type ASNLookup struct {
ASN uint32 `json:"asn,omitempty"`
CountryCode string `json:"country_code,omitempty"`
Registry string `json:"registry,omitempty"`
ASNAllocationDate string `json:"asn_allocation_date,omitempty"`
ASNDescription string `json:"asn_description,omitempty"`
}
ASNLookup contains the result of a query to ASX.asn.cymru.com
type AnnotatorFactory ¶
type BasePluginConf ¶
type CensysAnnotator ¶
type CensysAnnotator struct {
Factory *CensysAnnotatorFactory
Id int
}
CensysAnnotator (Per-Worker)
func (*CensysAnnotator) Annotate ¶
func (a *CensysAnnotator) Annotate(ip net.IP) interface{}
Annotate performs a Censys host lookup for the given IP address and returns the results. If an error occurs or a lookup fails, it returns nil
func (*CensysAnnotator) Close ¶
func (a *CensysAnnotator) Close() error
func (*CensysAnnotator) GetFieldName ¶
func (a *CensysAnnotator) GetFieldName() string
func (*CensysAnnotator) Initialize ¶
func (a *CensysAnnotator) Initialize() (err error)
type CensysAnnotatorFactory ¶
type CensysAnnotatorFactory struct {
BasePluginConf
// contains filtered or unexported fields
}
func (*CensysAnnotatorFactory) AddFlags ¶
func (a *CensysAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*CensysAnnotatorFactory) Close ¶
func (a *CensysAnnotatorFactory) Close() error
func (*CensysAnnotatorFactory) GetWorkers ¶
func (a *CensysAnnotatorFactory) GetWorkers() int
func (*CensysAnnotatorFactory) GroupName ¶
func (a *CensysAnnotatorFactory) GroupName() string
func (*CensysAnnotatorFactory) Initialize ¶
func (a *CensysAnnotatorFactory) Initialize(_ *GlobalConf) error
func (*CensysAnnotatorFactory) IsEnabled ¶
func (a *CensysAnnotatorFactory) IsEnabled() bool
func (*CensysAnnotatorFactory) MakeAnnotator ¶
func (a *CensysAnnotatorFactory) MakeAnnotator(i int) Annotator
type CymruAnnotator ¶
type CymruAnnotator struct {
Factory *CymruAnnotatorFactory
Id int
// contains filtered or unexported fields
}
func (*CymruAnnotator) Annotate ¶
func (a *CymruAnnotator) Annotate(ip net.IP) interface{}
Annotate performs a Cymru data lookup for the given IP address and returns the results. If an error occurs or a lookup fails, it returns nil
func (*CymruAnnotator) Close ¶
func (a *CymruAnnotator) Close() error
func (*CymruAnnotator) GetFieldName ¶
func (a *CymruAnnotator) GetFieldName() string
func (*CymruAnnotator) Initialize ¶
func (a *CymruAnnotator) Initialize() (err error)
Cymru Annotator (Per-Worker)
type CymruAnnotatorFactory ¶
type CymruAnnotatorFactory struct {
BasePluginConf
RawResolvers string
// contains filtered or unexported fields
}
func (*CymruAnnotatorFactory) AddFlags ¶
func (a *CymruAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*CymruAnnotatorFactory) Close ¶
func (a *CymruAnnotatorFactory) Close() error
func (*CymruAnnotatorFactory) GetWorkers ¶
func (a *CymruAnnotatorFactory) GetWorkers() int
func (*CymruAnnotatorFactory) GroupName ¶
func (a *CymruAnnotatorFactory) GroupName() string
func (*CymruAnnotatorFactory) Initialize ¶
func (a *CymruAnnotatorFactory) Initialize(_ *GlobalConf) error
func (*CymruAnnotatorFactory) IsEnabled ¶
func (a *CymruAnnotatorFactory) IsEnabled() bool
func (*CymruAnnotatorFactory) MakeAnnotator ¶
func (a *CymruAnnotatorFactory) MakeAnnotator(i int) Annotator
type CymruResult ¶
type CymruResult struct {
OriginASNs []uint32 `json:"origin_asns,omitempty"`
PeerASNs []uint32 `json:"peer_asns,omitempty"`
ASNLookup []*ASNLookup `json:"asn_details,omitempty"` // both Peer and Origin ASN Details
PrefixDetails []*PrefixResult `json:"prefix_details,omitempty"` // Prefix to details
// contains filtered or unexported fields
}
CymruResult stores the format for the result from the Cymru annotator
type GeoIP2Annotator ¶
type GeoIP2Annotator struct {
Factory *GeoIP2AnnotatorFactory
Reader *geoip2.Reader
Id int
}
func (*GeoIP2Annotator) Annotate ¶
func (a *GeoIP2Annotator) Annotate(ip net.IP) interface{}
func (*GeoIP2Annotator) Close ¶
func (a *GeoIP2Annotator) Close() error
func (*GeoIP2Annotator) GeoIP2FillStruct ¶
func (a *GeoIP2Annotator) GeoIP2FillStruct(in *geoip2.City) *GeoIP2Output
func (*GeoIP2Annotator) GetFieldName ¶
func (a *GeoIP2Annotator) GetFieldName() string
func (*GeoIP2Annotator) Initialize ¶
func (a *GeoIP2Annotator) Initialize() error
type GeoIP2AnnotatorFactory ¶
type GeoIP2AnnotatorFactory struct {
BasePluginConf
Path string
Mode string
Language string
RawInclude string
Conf *GlobalConf
// what data to include
IncludeCity bool
IncludeCountry bool
IncludeContinent bool
IncludePostal bool
IncludeLatLong bool
IncludeTraits bool
IncludeSubdivisions bool
IncludeRepresentedCountry bool
IncludeRegisteredCountry bool
}
func (*GeoIP2AnnotatorFactory) AddFlags ¶
func (a *GeoIP2AnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*GeoIP2AnnotatorFactory) Close ¶
func (a *GeoIP2AnnotatorFactory) Close() error
func (*GeoIP2AnnotatorFactory) GetWorkers ¶
func (a *GeoIP2AnnotatorFactory) GetWorkers() int
func (*GeoIP2AnnotatorFactory) GroupName ¶
func (a *GeoIP2AnnotatorFactory) GroupName() string
GeoIP2 Annotator Factory (Global)
func (*GeoIP2AnnotatorFactory) Initialize ¶
func (a *GeoIP2AnnotatorFactory) Initialize(conf *GlobalConf) error
func (*GeoIP2AnnotatorFactory) IsEnabled ¶
func (a *GeoIP2AnnotatorFactory) IsEnabled() bool
func (*GeoIP2AnnotatorFactory) MakeAnnotator ¶
func (a *GeoIP2AnnotatorFactory) MakeAnnotator(i int) Annotator
type GeoIP2City ¶
type GeoIP2Country ¶
type GeoIP2LatLong ¶
type GeoIP2Output ¶
type GeoIP2Output struct {
City *GeoIP2City `json:"city,omitempty"`
Country *GeoIP2Country `json:"country,omitempty"`
Continent *GeoIP2Country `json:"continent,omitempty"`
Postal *GeoIP2Postal `json:"postal,omitempty"`
LatLong *GeoIP2LatLong `json:"latlong,omitempty"`
RepresentedCountry *GeoIP2Country `json:"represented_country,omitempty"`
RegisteredCountry *GeoIP2Country `json:"registered_country,omitempty"`
Traits *GeoIP2Traits `json:"metadata,omitempty"`
}
type GeoIP2Postal ¶
type GeoIP2Postal struct {
Code string `json:"code,omitempty"`
}
type GeoIP2Traits ¶
type GeoIPASNAnnotator ¶
type GeoIPASNAnnotator struct {
Factory *GeoIPASNAnnotatorFactory
Reader *geoip2.Reader
Id int
}
func (*GeoIPASNAnnotator) Annotate ¶
func (anno *GeoIPASNAnnotator) Annotate(ip net.IP) interface{}
func (*GeoIPASNAnnotator) Close ¶
func (anno *GeoIPASNAnnotator) Close() error
func (*GeoIPASNAnnotator) GetFieldName ¶
func (anno *GeoIPASNAnnotator) GetFieldName() string
func (*GeoIPASNAnnotator) Initialize ¶
func (anno *GeoIPASNAnnotator) Initialize() error
type GeoIPASNAnnotatorFactory ¶
type GeoIPASNAnnotatorFactory struct {
BasePluginConf
Path string
Mode string
}
func (*GeoIPASNAnnotatorFactory) AddFlags ¶
func (fact *GeoIPASNAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*GeoIPASNAnnotatorFactory) Close ¶
func (fact *GeoIPASNAnnotatorFactory) Close() error
func (*GeoIPASNAnnotatorFactory) GetWorkers ¶
func (fact *GeoIPASNAnnotatorFactory) GetWorkers() int
func (*GeoIPASNAnnotatorFactory) GroupName ¶
func (fact *GeoIPASNAnnotatorFactory) GroupName() string
func (*GeoIPASNAnnotatorFactory) Initialize ¶
func (fact *GeoIPASNAnnotatorFactory) Initialize(_ *GlobalConf) error
func (*GeoIPASNAnnotatorFactory) IsEnabled ¶
func (fact *GeoIPASNAnnotatorFactory) IsEnabled() bool
func (*GeoIPASNAnnotatorFactory) MakeAnnotator ¶
func (fact *GeoIPASNAnnotatorFactory) MakeAnnotator(i int) Annotator
type GeoIPASNOutput ¶
type GlobalConf ¶
type GlobalConf struct {
InputFilePath string
InputFileType string
OutputFilePath string
LogFilePath string
StatusUpdatesFilePath string
Verbosity int
Threads int
InputIPFieldName string
OutputAnnotationFieldName string
InputDecodeThreads int
OutputEncodeThreads int
// contains filtered or unexported fields
}
type GreyNoiseAnnotator ¶
type GreyNoiseAnnotator struct {
Factory *GreyNoiseAnnotatorFactory
Id int
}
GreyNoiseAnnotator (Per-Worker)
func (*GreyNoiseAnnotator) Annotate ¶
func (a *GreyNoiseAnnotator) Annotate(ip net.IP) interface{}
Annotate performs a GreyNoise local lookup for the given IP address and returns the results. If an error occurs or a lookup fails, it returns nil
func (*GreyNoiseAnnotator) Close ¶
func (a *GreyNoiseAnnotator) Close() error
func (*GreyNoiseAnnotator) GetFieldName ¶
func (a *GreyNoiseAnnotator) GetFieldName() string
func (*GreyNoiseAnnotator) Initialize ¶
func (a *GreyNoiseAnnotator) Initialize() (err error)
type GreyNoiseAnnotatorFactory ¶
type GreyNoiseAnnotatorFactory struct {
BasePluginConf
DBPath string // path to the .mmdb path
// contains filtered or unexported fields
}
func (*GreyNoiseAnnotatorFactory) AddFlags ¶
func (a *GreyNoiseAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*GreyNoiseAnnotatorFactory) Close ¶
func (a *GreyNoiseAnnotatorFactory) Close() error
func (*GreyNoiseAnnotatorFactory) GetWorkers ¶
func (a *GreyNoiseAnnotatorFactory) GetWorkers() int
func (*GreyNoiseAnnotatorFactory) GroupName ¶
func (a *GreyNoiseAnnotatorFactory) GroupName() string
func (*GreyNoiseAnnotatorFactory) Initialize ¶
func (a *GreyNoiseAnnotatorFactory) Initialize(_ *GlobalConf) error
func (*GreyNoiseAnnotatorFactory) IsEnabled ¶
func (a *GreyNoiseAnnotatorFactory) IsEnabled() bool
func (*GreyNoiseAnnotatorFactory) MakeAnnotator ¶
func (a *GreyNoiseAnnotatorFactory) MakeAnnotator(i int) Annotator
type IPInfoAnnotator ¶
type IPInfoAnnotator struct {
Factory *IPInfoAnnotatorFactory
Id int
}
func (*IPInfoAnnotator) Annotate ¶
func (a *IPInfoAnnotator) Annotate(inputIP net.IP) interface{}
func (*IPInfoAnnotator) Close ¶
func (a *IPInfoAnnotator) Close() error
func (*IPInfoAnnotator) GetFieldName ¶
func (a *IPInfoAnnotator) GetFieldName() string
func (*IPInfoAnnotator) Initialize ¶
func (a *IPInfoAnnotator) Initialize() error
type IPInfoAnnotatorFactory ¶
type IPInfoAnnotatorFactory struct {
BasePluginConf
DatabaseFilePath string
// contains filtered or unexported fields
}
func (*IPInfoAnnotatorFactory) AddFlags ¶
func (a *IPInfoAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*IPInfoAnnotatorFactory) Close ¶
func (a *IPInfoAnnotatorFactory) Close() error
func (*IPInfoAnnotatorFactory) GetWorkers ¶
func (a *IPInfoAnnotatorFactory) GetWorkers() int
func (*IPInfoAnnotatorFactory) GroupName ¶
func (a *IPInfoAnnotatorFactory) GroupName() string
func (*IPInfoAnnotatorFactory) Initialize ¶
func (a *IPInfoAnnotatorFactory) Initialize(conf *GlobalConf) (err error)
func (*IPInfoAnnotatorFactory) IsEnabled ¶
func (a *IPInfoAnnotatorFactory) IsEnabled() bool
func (*IPInfoAnnotatorFactory) MakeAnnotator ¶
func (a *IPInfoAnnotatorFactory) MakeAnnotator(i int) Annotator
type IPInfoMMDBOutput ¶
type IPInfoMMDBOutput struct {
City string `maxminddb:"city"`
Region string `maxminddb:"region"`
RegionCode string `maxminddb:"region_code"`
Country string `maxminddb:"country"`
CountryCode string `maxminddb:"country_code"`
Continent string `maxminddb:"continent"`
ContinentCode string `maxminddb:"continent_code"`
Latitude string `maxminddb:"latitude"`
Longitude string `maxminddb:"longitude"`
Timezone string `maxminddb:"timezone"`
PostalCode string `maxminddb:"postal_code"`
DMACode string `maxminddb:"dma_code"`
GeonameID string `maxminddb:"geoname_id"` // GeoNames database identifier (if available).
Radius string `maxminddb:"radius"` // Accuracy radius in kilometers (if available).
GeoChanged string `maxminddb:"geo_changed"` // Timestamp or flag indicating when the geolocation last changed (if available).
ASN string `maxminddb:"asn"`
ASName string `maxminddb:"as_name"`
ASDomain string `maxminddb:"as_domain"`
ASType string `maxminddb:"as_type"`
ASChanged string `maxminddb:"as_changed"`
CarrierName string `maxminddb:"carrier_name"` // Name of the mobile carrier (if available).
MobileCountryCode string `maxminddb:"mcc"`
MobileNetworkCode string `maxminddb:"mnc"`
PrivacyName string `maxminddb:"privacy_name"` // Specific name of the privacy or anonymization service detected (e.g., “NordVPN”).
IsProxy string `maxminddb:"is_proxy"`
IsRelay string `maxminddb:"is_relay"` // Boolean flag indicating use of a general relay service
IsTOR string `maxminddb:"is_tor"` // Whether the IP is a known TOR exit node.
IsVPN string `maxminddb:"is_vpn"` // Flag indicating use of a VPN Service
IsAnonymous string `maxminddb:"is_anonymous"` // True if the IP is associated with VPN, proxy, Tor, or a relay service.
IsAnycast string `maxminddb:"is_anycast"` // Whether the IP is using anycast routing.
IsHosting string `maxminddb:"is_hosting"` // True if the IP address is an internet service hosting IP address
IsMobile string `maxminddb:"is_mobile"` // True if the IP address is associated with a mobile network or carrier.
IsSatellite string `maxminddb:"is_satellite"` // True if the IP address is associated with a satellite connection
}
IPInfoMMDBOutput includes both the Plus/Core/Lite IPInfo fields and their maxminddb tags. We'll convert this into a IPInfoModuleOutput for JSON output (converting string fields to appropriate types).
func (*IPInfoMMDBOutput) ToModuleOutput ¶
func (in *IPInfoMMDBOutput) ToModuleOutput() *IPInfoModuleOutput
type IPInfoModuleOutput ¶
type IPInfoModuleOutput struct {
City string `json:"city,omitempty"`
Region string `json:"region,omitempty"`
RegionCode string `json:"region_code,omitempty"`
Country string `json:"country,omitempty"`
CountryCode string `json:"country_code,omitempty"`
Continent string `json:"continent,omitempty"`
ContinentCode string `json:"continent_code,omitempty"`
Latitude float64 `json:"latitude,omitempty"`
Longitude float64 `json:"longitude,omitempty"`
Timezone string `json:"timezone,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
DMACode string `json:"dma_code,omitempty"` // Nielsen Designated Market Area code (if available).
GeonameID uint64 `json:"geoname_id,omitempty"` // GeoNames database identifier (if available).
Radius uint64 `json:"radius,omitempty"` // Accuracy radius in kilometers (if available).
GeoChanged string `json:"geo_changed,omitempty"` // Timestamp or flag indicating when the geolocation last changed (if available).
ASN string `json:"asn,omitempty"`
ASName string `json:"as_name,omitempty"`
ASDomain string `json:"as_domain,omitempty"`
ASType string `json:"as_type,omitempty"`
ASChanged string `json:"as_changed,omitempty"`
CarrierName string `json:"carrier_name,omitempty"` // Name of the mobile carrier (if available).
MobileCountryCode string `json:"mobile_country_code,omitempty"`
MobileNetworkCode string `json:"mobile_network_code,omitempty"`
PrivacyName string `json:"privacy_name,omitempty"` // Specific name of the privacy or anonymization service detected (e.g., “NordVPN”).
IsProxy *bool `json:"is_proxy,omitempty"`
IsRelay *bool `json:"is_relay,omitempty"` // Boolean flag indicating use of a general relay service
IsTOR *bool `json:"is_tor,omitempty"` // Whether the IP is a known TOR exit node.
IsVPN *bool `json:"is_vpn,omitempty"` // Flag indicating use of a VPN Service
IsAnonymous *bool `json:"is_anonymous,omitempty"` // True if the IP is associated with VPN, proxy, Tor, or a relay service.
IsAnycast *bool `json:"is_anycast,omitempty"` // Whether the IP is using anycast routing.
IsHosting *bool `json:"is_hosting,omitempty"` // True if the IP address is an internet service hosting IP address
IsMobile *bool `json:"is_mobile,omitempty"` // True if the IP address is associated with a mobile network or carrier.
IsSatellite *bool `json:"is_satellite,omitempty"` // True if the IP address is associated with a satellite connection
}
IPInfoModuleOutput is the final output struct with appropriate types for JSON output
type PrefixResult ¶
type PrefixResult struct {
Prefix string `json:"prefix,omitempty"`
OriginASNs []uint32 `json:"origin_asns,omitempty"`
PeerASNs []uint32 `json:"peer_asns,omitempty"`
CountryCode string `json:"country_code,omitempty"`
Registry string `json:"registry,omitempty"`
AllocationDate string `json:"allocation_date,omitempty"`
}
type RDAPAnnotator ¶
type RDAPAnnotator struct {
Factory *RDAPAnnotatorFactory
Id int
// contains filtered or unexported fields
}
func (*RDAPAnnotator) Annotate ¶
func (a *RDAPAnnotator) Annotate(ip net.IP) interface{}
func (*RDAPAnnotator) Close ¶
func (a *RDAPAnnotator) Close() error
func (*RDAPAnnotator) GetFieldName ¶
func (a *RDAPAnnotator) GetFieldName() string
func (*RDAPAnnotator) Initialize ¶
func (a *RDAPAnnotator) Initialize() error
type RDAPAnnotatorFactory ¶
type RDAPAnnotatorFactory struct {
BasePluginConf
Timeout int // Timeout for each RDAP query, in seconds
}
func (*RDAPAnnotatorFactory) AddFlags ¶
func (a *RDAPAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*RDAPAnnotatorFactory) Close ¶
func (a *RDAPAnnotatorFactory) Close() error
func (*RDAPAnnotatorFactory) GetWorkers ¶
func (a *RDAPAnnotatorFactory) GetWorkers() int
func (*RDAPAnnotatorFactory) GroupName ¶
func (a *RDAPAnnotatorFactory) GroupName() string
RDAP Annotator Factory (Global)
func (*RDAPAnnotatorFactory) Initialize ¶
func (a *RDAPAnnotatorFactory) Initialize(_ *GlobalConf) error
func (*RDAPAnnotatorFactory) IsEnabled ¶
func (a *RDAPAnnotatorFactory) IsEnabled() bool
func (*RDAPAnnotatorFactory) MakeAnnotator ¶
func (a *RDAPAnnotatorFactory) MakeAnnotator(i int) Annotator
type RDNSAnnotator ¶
type RDNSAnnotator struct {
Factory *RDNSAnnotatorFactory
Id int
// contains filtered or unexported fields
}
func (*RDNSAnnotator) Annotate ¶
func (a *RDNSAnnotator) Annotate(ip net.IP) interface{}
Annotate performs a reverse DNS lookup for the given IP address and returns the results. If an error occurs or a lookup fails, it returns nil
func (*RDNSAnnotator) Close ¶
func (a *RDNSAnnotator) Close() error
func (*RDNSAnnotator) GetFieldName ¶
func (a *RDNSAnnotator) GetFieldName() string
func (*RDNSAnnotator) Initialize ¶
func (a *RDNSAnnotator) Initialize() (err error)
type RDNSAnnotatorFactory ¶
type RDNSAnnotatorFactory struct {
BasePluginConf
RawResolvers string
// contains filtered or unexported fields
}
func (*RDNSAnnotatorFactory) AddFlags ¶
func (a *RDNSAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*RDNSAnnotatorFactory) Close ¶
func (a *RDNSAnnotatorFactory) Close() error
func (*RDNSAnnotatorFactory) GetWorkers ¶
func (a *RDNSAnnotatorFactory) GetWorkers() int
func (*RDNSAnnotatorFactory) GroupName ¶
func (a *RDNSAnnotatorFactory) GroupName() string
func (*RDNSAnnotatorFactory) Initialize ¶
func (a *RDNSAnnotatorFactory) Initialize(_ *GlobalConf) error
func (*RDNSAnnotatorFactory) IsEnabled ¶
func (a *RDNSAnnotatorFactory) IsEnabled() bool
func (*RDNSAnnotatorFactory) MakeAnnotator ¶
func (a *RDNSAnnotatorFactory) MakeAnnotator(i int) Annotator
type RDNSOutput ¶
type RDNSOutput struct {
DomainNames []string `json:"domain_names,omitempty"`
}
type RoutingAnnotator ¶
type RoutingAnnotator struct {
Factory *RoutingAnnotatorFactory
Id int
// contains filtered or unexported fields
}
func (*RoutingAnnotator) Annotate ¶
func (a *RoutingAnnotator) Annotate(ip net.IP) interface{}
func (*RoutingAnnotator) Close ¶
func (a *RoutingAnnotator) Close() error
func (*RoutingAnnotator) GetFieldName ¶
func (a *RoutingAnnotator) GetFieldName() string
func (*RoutingAnnotator) Initialize ¶
func (a *RoutingAnnotator) Initialize() error
type RoutingAnnotatorFactory ¶
type RoutingAnnotatorFactory struct {
BasePluginConf
RoutingTablePath string
ASNamesPath string
ASDataPath string
// contains filtered or unexported fields
}
func (*RoutingAnnotatorFactory) AddFlags ¶
func (a *RoutingAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*RoutingAnnotatorFactory) Close ¶
func (a *RoutingAnnotatorFactory) Close() error
func (*RoutingAnnotatorFactory) GetWorkers ¶
func (a *RoutingAnnotatorFactory) GetWorkers() int
func (*RoutingAnnotatorFactory) GroupName ¶
func (a *RoutingAnnotatorFactory) GroupName() string
Routing Annotator Factory (Global)
func (*RoutingAnnotatorFactory) Initialize ¶
func (a *RoutingAnnotatorFactory) Initialize(_ *GlobalConf) error
func (*RoutingAnnotatorFactory) IsEnabled ¶
func (a *RoutingAnnotatorFactory) IsEnabled() bool
func (*RoutingAnnotatorFactory) MakeAnnotator ¶
func (a *RoutingAnnotatorFactory) MakeAnnotator(i int) Annotator
type SpurAnnotator ¶
type SpurAnnotator struct {
Factory *SpurAnnotatorFactory
Id int
// contains filtered or unexported fields
}
func (*SpurAnnotator) Annotate ¶
func (a *SpurAnnotator) Annotate(ip net.IP) interface{}
Annotate performs a Spur data lookup for the given IP address and returns the results. If an error occurs or a lookup fails, it returns nil
func (*SpurAnnotator) Close ¶
func (a *SpurAnnotator) Close() error
func (*SpurAnnotator) GetFieldName ¶
func (a *SpurAnnotator) GetFieldName() string
func (*SpurAnnotator) Initialize ¶
func (a *SpurAnnotator) Initialize() error
Spur Annotator (Per-Worker)
type SpurAnnotatorFactory ¶
type SpurAnnotatorFactory struct {
BasePluginConf
// contains filtered or unexported fields
}
func (*SpurAnnotatorFactory) AddFlags ¶
func (a *SpurAnnotatorFactory) AddFlags(flags *flag.FlagSet)
func (*SpurAnnotatorFactory) Close ¶
func (a *SpurAnnotatorFactory) Close() error
func (*SpurAnnotatorFactory) GetWorkers ¶
func (a *SpurAnnotatorFactory) GetWorkers() int
func (*SpurAnnotatorFactory) GroupName ¶
func (a *SpurAnnotatorFactory) GroupName() string
func (*SpurAnnotatorFactory) Initialize ¶
func (a *SpurAnnotatorFactory) Initialize(_ *GlobalConf) error
func (*SpurAnnotatorFactory) IsEnabled ¶
func (a *SpurAnnotatorFactory) IsEnabled() bool
func (*SpurAnnotatorFactory) MakeAnnotator ¶
func (a *SpurAnnotatorFactory) MakeAnnotator(i int) Annotator

