hquack

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: 16 Imported by: 0

Documentation

Overview

Package hquack contains analysis scripts for quack and hyperquack protocols

Package hquack contains analysis scripts for quack and hyperquack protocols

Package hquack contains analysis scripts for quack and hyperquack protocols

Package hquack contains analysis scripts for quack and hyperquack protocols

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 AnalyzeHquack

func AnalyzeHquack(inputFile string, outputFile string, technique string)

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

func AssetsHTTPRequest

func AssetsHTTPRequest(url string) string

AssetsHTTPRequest performs a HTTP request for a Censored Planet asset and returns the body of the response

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 ReadFingerprints

func ReadFingerprints(url string) (map[string]*regexp.Regexp, error)

ReadFingerprints reads blockpage and false positive fingerprints into memory from a URL

func WriteToCSV

func WriteToCSV(dataMap map[string]map[string]map[string]int, target string, 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", "Error Type"), 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 Anomaly

type Anomaly struct {
	InAnomalyData       <-chan map[string]interface{}
	OutAnomalyData      chan<- map[string]interface{}
	InBlockpageData     <-chan map[string]*regexp.Regexp
	InFalsePositiveData <-chan map[string]*regexp.Regexp
	InTechnique         <-chan string
}

Anomaly is the component that holds the type of anomaly, and whether the anomaly is confirmed or not

func (*Anomaly) Process

func (a *Anomaly) Process()

Process analyses the type of blocking and determines whether the anomaly is confirmed or not

type Filter

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

Filter is the component for filtering failed measurements

func (*Filter) Process

func (f *Filter) Process()

Process filters out failed measurements Either FailSanity is set to true, or the measurement error matches one of the filter error types

type MetaData

type MetaData struct {
	InMetaData  <-chan map[string]interface{}
	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

Jump to

Keyboard shortcuts

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