graph

package
v3.4.12 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

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

Graph implements the Amass network infrastructure data model.

func NewGraph

func NewGraph(database db.GraphDatabase) *Graph

NewGraph accepts a graph database that stores the Graph created and maintained by the data model.

func (*Graph) AddNodeToEvent

func (g *Graph) AddNodeToEvent(node db.Node, source, tag, eventID string) error

AddNodeToEvent creates an associations between a node in the graph, a data source and a discovery task.

func (*Graph) Close

func (g *Graph) Close()

Close will close the graph database being used by the Graph receiver.

func (*Graph) DumpGraph

func (g *Graph) DumpGraph() string

DumpGraph returns all the data being stored in the graph database.

func (*Graph) EventDateRange

func (g *Graph) EventDateRange(uuid string) (time.Time, time.Time)

EventDateRange returns the date range associated with the provided event UUID.

func (*Graph) EventDomains

func (g *Graph) EventDomains(uuid string) []string

EventDomains returns the domains that were involved in the event.

func (*Graph) EventList

func (g *Graph) EventList() []string

EventList returns a list of event UUIDs found in the graph.

func (*Graph) GetOutput

func (g *Graph) GetOutput(uuid string) []*requests.Output

GetOutput returns findings within the enumeration Graph.

func (*Graph) InsertA

func (g *Graph) InsertA(fqdn, addr, source, tag, eventID string) error

InsertA creates FQDN, IP address and A record edge in the graph and associates them with a source and event.

func (*Graph) InsertAAAA

func (g *Graph) InsertAAAA(fqdn, addr, source, tag, eventID string) error

InsertAAAA creates FQDN, IP address and AAAA record edge in the graph and associates them with a source and event.

func (*Graph) InsertAS

func (g *Graph) InsertAS(asn, desc, source, tag, eventID string) (db.Node, error)

InsertAS adds/updates an autonomous system in the graph.

func (*Graph) InsertAddress

func (g *Graph) InsertAddress(addr, source, tag, eventID string) (db.Node, error)

InsertAddress creates an IP address in the graph and associates it with a source and event.

func (*Graph) InsertCNAME

func (g *Graph) InsertCNAME(fqdn, target, source, tag, eventID string) error

InsertCNAME adds the FQDNs and CNAME record between them to the graph.

func (*Graph) InsertEdge

func (g *Graph) InsertEdge(edge *db.Edge) error

InsertEdge will create an edge in the database if it does not already exist.

func (*Graph) InsertEvent

func (g *Graph) InsertEvent(eventID string) (db.Node, error)

InsertEvent create an event node in the graph that represents a discovery task.

func (*Graph) InsertFQDN

func (g *Graph) InsertFQDN(name, source, tag, eventID string) (db.Node, error)

InsertFQDN adds a fully qualified domain name to the graph.

func (*Graph) InsertInfrastructure

func (g *Graph) InsertInfrastructure(asn int, desc, addr, cidr, source, tag, eventID string) error

InsertInfrastructure adds/updates an associated IP address, netblock and autonomous system in the graph.

func (*Graph) InsertMX

func (g *Graph) InsertMX(fqdn, target, source, tag, eventID string) error

InsertMX adds the FQDNs and MX record between them to the graph.

func (*Graph) InsertNS

func (g *Graph) InsertNS(fqdn, target, source, tag, eventID string) error

InsertNS adds the FQDNs and NS record between them to the graph.

func (*Graph) InsertNetblock

func (g *Graph) InsertNetblock(cidr, source, tag, eventID string) (db.Node, error)

InsertNetblock adds a netblock/CIDR to the graph.

func (*Graph) InsertNodeIfNotExist

func (g *Graph) InsertNodeIfNotExist(id, ntype string) (db.Node, error)

InsertNodeIfNotExist will create a node in the database if it does not already exist.

func (*Graph) InsertPTR

func (g *Graph) InsertPTR(fqdn, target, source, tag, eventID string) error

InsertPTR adds the FQDNs and PTR record between them to the graph.

func (*Graph) InsertSRV

func (g *Graph) InsertSRV(fqdn, service, target, source, tag, eventID string) error

InsertSRV adds the FQDNs and SRV record between them to the graph.

func (*Graph) InsertSource

func (g *Graph) InsertSource(source, tag string) (db.Node, error)

InsertSource creates a data source node in the graph.

func (*Graph) IsCNAMENode

func (g *Graph) IsCNAMENode(fqdn string) bool

IsCNAMENode returns true if the FQDN has a CNAME edge to another FQDN in the graph.

func (*Graph) IsMXNode

func (g *Graph) IsMXNode(fqdn string) bool

IsMXNode returns true if the FQDN has a MX edge pointing to it in the graph.

func (*Graph) IsNSNode

func (g *Graph) IsNSNode(fqdn string) bool

IsNSNode returns true if the FQDN has a NS edge pointing to it in the graph.

func (*Graph) IsPTRNode

func (g *Graph) IsPTRNode(fqdn string) bool

IsPTRNode returns true if the FQDN has a PTR edge to another FQDN in the graph.

func (*Graph) IsRootDomainNode

func (g *Graph) IsRootDomainNode(fqdn string) bool

IsRootDomainNode returns true if the FQDN has a 'root' edge pointing to it in the graph.

func (*Graph) IsTLDNode

func (g *Graph) IsTLDNode(fqdn string) bool

IsTLDNode returns true if the FQDN has a 'tld' edge pointing to it in the graph.

func (*Graph) ReadASDescription

func (g *Graph) ReadASDescription(asn string) string

ReadASDescription the description property of an autonomous system in the graph.

func (*Graph) SourceTag

func (g *Graph) SourceTag(source string) string

SourceTag returns the tag associated with the identified data source.

func (*Graph) String

func (g *Graph) String() string

String returns the name of the graph database used by the Graph.

func (*Graph) VizData

func (g *Graph) VizData(uuid string) ([]viz.Node, []viz.Edge)

VizData returns the current state of the Graph as viz package Nodes and Edges.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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