satellite

package
v0.0.0-...-73376d2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package satellite contains analysis scripts for satellite data

Package satellite contains analysis scripts for satellite data

Package satellite contains analysis scripts for satellite

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(data []map[string]interface{}, analysisType string) map[string]map[string]map[string]int

Analyze processes data based on the type of analysis specified Input - The data ([]map[string]interface{}), the analysisType (Specified by the user prompt) Returns - The stats about the data (map[string]map[string]map[string]int)

func AnalyzeSatellite

func AnalyzeSatellite(inputFile string, outputFile string, satellitev1HtmlFile string)

AnalyzeSatellite is the main function that handles io and set up of the network

func ProcessLine

func ProcessLine() *goflow.Graph

ProcessLine constructs the directed cyclic graph that handles data flow between different components.

func Prompt

func Prompt() string

Prompt gets the user's choice of analysis type

func WriteToCSV

func WriteToCSV(dataMap map[string]map[string]map[string]int, filename string)

WriteToCSV writes a map of analyzed data to a CSV file. Input - The data to write (map[string]map[string]map[string]int), the analysis type ("Vantage Point", "Domain"), Output csv filename Returns - None WriteToCSV expects the data to be in a certain nested map format.

Types

type Analysis

type Analysis struct {
	InAnalysisData  <-chan map[string]interface{}
	InAnalysisType  <-chan string
	OutAnalysisData chan<- map[string]interface{}
}

Analysis is the component that stores the input and output for different types of analysis

func (*Analysis) Process

func (a *Analysis) Process()

Process performs analysis on the filtered data to calcuate different types of aggregates TODO: Add more analysis types

type Fetch

type Fetch struct {
	InFetchData         <-chan map[string]interface{}
	InBlockpageData     <-chan map[string]*regexp.Regexp
	InFalsePositiveData <-chan map[string]*regexp.Regexp
	HTMLPages           <-chan map[string]string
	OutFetchData        chan<- map[string]interface{}
}

Fetch is the component for applying blockpage and unexpected responses regex matching

func (*Fetch) Process

func (f *Fetch) Process()

Process applies blockpage and unexpected responses regex matching

type Filter

type Filter struct {
	InFilterData   <-chan map[string]interface{}
	ControlAnswers <-chan map[string]*tagsSet
	OutFilterData  chan<- map[string]interface{}
}

Filter is the component for marking untagged measurements

func (*Filter) Process

func (f *Filter) Process()

Process marks untagged measurements

type MetaData

type MetaData struct {
	InMetaData  <-chan map[string]interface{}
	Geolocation <-chan map[string]string
	OutMetaData chan<- map[string]interface{}
}

MetaData is the component that assigns measurement metadata to each row

func (*MetaData) Process

func (m *MetaData) Process()

Process assigns measurement metadata to each row

type Parse

type Parse struct {
	InLine      <-chan string
	ResJSONData chan<- map[string]interface{}
}

Parse forms the network components for parsing json information

func (*Parse) Process

func (p *Parse) Process()

Process parses the json data

type Verify

type Verify struct {
	InVerifyData  <-chan map[string]interface{}
	CDNIPs        <-chan set.Set
	OutVerifyData chan<- map[string]interface{}
}

Verify is the component for applying post procesing hueristics to avoid false positives

func (*Verify) Process

func (v *Verify) Process()

Process applies post processig hueristics to avoid false positives

Jump to

Keyboard shortcuts

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