output

package
v0.0.0-...-c4a24d9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxContentLines = 50
	SnipMark        = "----- cut at 50 entries -----"
)

Variables

View Source
var (
	DidSnip            bool
	DidAvoidEmptyBlock bool
)

Functions

func AddPkgToGraph

func AddPkgToGraph(pkg gopacket.Packet)

AddPkgToGraph adds the given packet as communication to the graph

func CreateGraph

func CreateGraph()

CreateGraph writes out a Graphviz digraph

func Finalize

func Finalize()

Called at the very end, before terminating pancap

func PrintBlock

func PrintBlock(headline string, content string)

Prints a block of information with the given headline If content is empty, printing the headline is omitted. If the content is longer than MaxContentLines, content is cut.

func PrintSummary

func PrintSummary()

Prints a brief summary about the extracted files

func RegisterFile

func RegisterFile(filename string, content []byte, origin string)

Registers a file with the given name and content. This function takes care of filesystem I/O handling and flag parsing. This means that a module should _always_ call this function when a file is encountered. origin is a descriptive string where the file comes from, e.g. the module name.

func RegisterFlags

func RegisterFlags()

func StoreFiles

func StoreFiles()

Iterates over all registered files and checks if they should be extracted and stored, and does exactly that.

Types

type File

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

func NewFile

func NewFile(name string, content []byte, origin string) File

Creates a new file object and calculates the hash of the given content

type GraphPkg

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

GraphPkg resembles a directed communication from one address to another It wraps up required information to draw a graph of the communication, including spoken protocols.

func (*GraphPkg) AddProtocol

func (p *GraphPkg) AddProtocol(protocol string)

AddProtocol adds the given protocol to the list of protocols if not already present

Jump to

Keyboard shortcuts

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