backend

package
v0.0.0-...-e9ab6a4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ports []uint16 = []uint16{
	21,
	22,
	23,
	25,
	53,
	79,
	80,
	110,
	143,
	161,
	443,
	631,
	1024,
	4444,
	2525,
	5353,
	5800,
	5900,
	8000,
	8080,
	8081,
}

Ports is the list of ports (TCP and UDP) we consider interesting.

Functions

This section is empty.

Types

type MetaEngine

type MetaEngine struct {
	// contains filtered or unexported fields

} // type MetaEngine struct

MetaEngine processes metadata on Hosts.

func OpenMetaEngine

func OpenMetaEngine(path string) (*MetaEngine, error)

OpenMetaEngine creates a new MetaEngine.

func (*MetaEngine) Close

func (m *MetaEngine) Close()

Close closes the MetaEngine.

func (*MetaEngine) LookupCity

func (m *MetaEngine) LookupCity(h *data.Host) (string, error)

LookupCity attempts to determine what city a Host is located in.

func (*MetaEngine) LookupCountry

func (m *MetaEngine) LookupCountry(h *data.Host) (string, error)

LookupCountry attempts to determine what county a Host is located in.

func (*MetaEngine) LookupOperatingSystem

func (m *MetaEngine) LookupOperatingSystem(h *data.HostWithPorts) string

LookupOperatingSystem attempts to determine what OS a Host is running.

type Nexus

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

Nexus aggregates the various pieces that comprise the backend.

func CreateNexus

func CreateNexus(gen *generator.HostGenerator, scanner *Scanner, xfr *xfr.Client) (*Nexus, error)

CreateNexus creates a new Nexus instance with the given components.

func (*Nexus) GetGeneratorCount

func (nx *Nexus) GetGeneratorCount() int

GetGeneratorCount returns the number of workers in the Generator.

func (*Nexus) GetScannerCount

func (nx *Nexus) GetScannerCount() int

GetScannerCount returns the number of workers in the Scanner

func (*Nexus) GetXFRCount

func (nx *Nexus) GetXFRCount() int

GetXFRCount returns the number of XFR workers.

func (*Nexus) SpawnWorker

func (nx *Nexus) SpawnWorker(f facility.Facility, n int)

func (*Nexus) StopWorker

func (nx *Nexus) StopWorker(f facility.Facility, n int)

func (*Nexus) WorkerCount

func (nx *Nexus) WorkerCount(f facility.Facility) int

type Scanner

type Scanner struct {
	RC chan data.ControlMessage
	// contains filtered or unexported fields
}

Scanner is a port scanner. Kind of.

func CreateScanner

func CreateScanner(workerCnt int) (*Scanner, error)

CreateScanner creates a new Scanner.

func (*Scanner) Count

func (sc *Scanner) Count() int

func (*Scanner) IsRunning

func (sc *Scanner) IsRunning() bool

IsRunning returns true if the Scanner is running.

func (*Scanner) Loop

func (sc *Scanner) Loop()

Loop is the Scanner's main loop.

func (*Scanner) PrintStatus

func (sc *Scanner) PrintStatus()

PrintStatus emits the Scanner's status.

func (*Scanner) Start

func (sc *Scanner) Start()

Start starts the Scanner. If it is already running, this method does nothing.

func (*Scanner) Stop

func (sc *Scanner) Stop()

Stop tells the Scanner to stop.

Directories

Path Synopsis
Package facility provides symbolic constants to enumerate the compoentns of the application.
Package facility provides symbolic constants to enumerate the compoentns of the application.

Jump to

Keyboard shortcuts

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