domainstats

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfigPath string
)

Functions

func GenerateDefaultConfig

func GenerateDefaultConfig(apiKey string) error

Generates a default config and writes it to ~/.domainstats/default.toml

Types

type CategoriesConfig

type CategoriesConfig struct {
	Labels             bool
	SecurityCategories bool
	ContentCategories  bool
}

type CategorizationQuery

type CategorizationQuery struct {
	DomainQuery
	Labels bool
}

func (*CategorizationQuery) Query

type Config

type Config struct {
	APIKey          string
	Status          bool
	Categories      CategoriesConfig
	Cooccurrences   DomainScoreConfig
	Related         DomainScoreConfig
	Security        SecurityConfig
	TaggingDates    TaggingDatesConfig
	DomainRRHistory DomainRRHistoryConfig
}

func NewConfig

func NewConfig(configFilePath string) (config *Config, err error)

Returns a new Config object. Reads the TOML file given by configFilePath.

func (*Config) DeriveHeader

func (c *Config) DeriveHeader() (header []string)

Derive the header of the CSV output file from the config

func (*Config) DeriveMessages

func (c *Config) DeriveMessages(inv *goinvestigate.Investigate,
	domain string) (msgs []*DomainQueryMessage)

returns the list of Investigate functions to call for each domain

func (*Config) ExtractCSVSubRow

func (c *Config) ExtractCSVSubRow(goinvResp interface{}) (row []string, err error)

Uses a goinvestigate response to derive the field values to go in a CSV row. Once all responses are processed with this function, the []string results can be concatenated to yield the final CSV row.

type CooccurrencesQuery

type CooccurrencesQuery struct {
	DomainQuery
}

func (*CooccurrencesQuery) Query

type DomainQuery

type DomainQuery struct {
	Inv    *goinvestigate.Investigate
	Domain string
}

type DomainQueryMessage

type DomainQueryMessage struct {
	Q        DomainQueryType
	RespChan chan DomainQueryResponse
}

type DomainQueryResponse

type DomainQueryResponse struct {
	Resp interface{}
	Err  error
}

type DomainQueryType

type DomainQueryType interface {
	Query() DomainQueryResponse
}

type DomainRRHistoryConfig

type DomainRRHistoryConfig struct {
	Periods  DomainRRHistoryPeriodConfig
	Features DomainRRHistoryFeaturesConfig
}

type DomainRRHistoryFeaturesConfig

type DomainRRHistoryFeaturesConfig struct {
	Age             bool
	TTLsMin         bool
	TTLsMax         bool
	TTLsMean        bool
	TTLsMedian      bool
	TTLsStdDev      bool
	CountryCodes    bool
	ASNs            bool
	Prefixes        bool
	RIPSCount       bool
	RIPSDiversity   bool
	Locations       bool
	GeoDistanceSum  bool
	GeoDistanceMean bool
	NonRoutable     bool
	MailExchanger   bool
	CName           bool
	FFCandidate     bool
	RIPSStability   bool
	BaseDomain      bool
	IsSubdomain     bool
}

type DomainRRHistoryPeriodConfig

type DomainRRHistoryPeriodConfig struct {
	FirstSeen bool
	LastSeen  bool
	Name      bool
	TTL       bool
	Class     bool
	Type      bool
	RR        bool
}

type DomainRRHistoryQuery

type DomainRRHistoryQuery struct {
	DomainQuery
	QueryType string
}

func (*DomainRRHistoryQuery) Query

type DomainScoreConfig

type DomainScoreConfig struct {
	Domain bool
	Score  bool
}

type DomainTagsQuery

type DomainTagsQuery struct {
	DomainQuery
}

func (*DomainTagsQuery) Query

type RelatedQuery

type RelatedQuery struct {
	DomainQuery
}

func (*RelatedQuery) Query

func (q *RelatedQuery) Query() DomainQueryResponse

type SecurityConfig

type SecurityConfig struct {
	DGAScore               bool
	Perplexity             bool
	Entropy                bool
	SecureRank2            bool
	PageRank               bool
	ASNScore               bool
	PrefixScore            bool
	RIPScore               bool
	Popularity             bool
	Fastflux               bool
	Geodiversity           bool
	GeodiversityNormalized bool
	TLDGeodiversity        bool
	Geoscore               bool
	KSTest                 bool
	Attack                 bool
	ThreatType             bool
}

type SecurityQuery

type SecurityQuery struct {
	DomainQuery
}

func (*SecurityQuery) Query

type TaggingDatesConfig

type TaggingDatesConfig struct {
	Begin    bool
	End      bool
	Category bool
	Url      bool
}

Jump to

Keyboard shortcuts

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