Documentation
¶
Index ¶
- Constants
- func DataOptsDriver(data []DataOptsParams, handler DataHandler) error
- type DataHandler
- type DataOptsHandler
- func (d *DataOptsHandler) Close()
- func (d *DataOptsHandler) EnumerationDateRange(uuid string) (time.Time, time.Time)
- func (d *DataOptsHandler) EnumerationDomains(uuid string) []string
- func (d *DataOptsHandler) EnumerationList() []string
- func (d *DataOptsHandler) GetOutput(uuid string, marked bool) []*requests.Output
- func (d *DataOptsHandler) Insert(data *DataOptsParams) error
- func (d *DataOptsHandler) IsCNAMENode(data *DataOptsParams) bool
- func (d *DataOptsHandler) MarkAsRead(data *DataOptsParams) error
- func (d *DataOptsHandler) String() string
- func (d *DataOptsHandler) VizData(uuid string) ([]viz.Node, []viz.Edge)
- type DataOptsParams
- type Graph
- func (g *Graph) Close()
- func (g *Graph) EnumerationDateRange(uuid string) (time.Time, time.Time)
- func (g *Graph) EnumerationDomains(uuid string) []string
- func (g *Graph) EnumerationList() []string
- func (g *Graph) GetOutput(uuid string, marked bool) []*requests.Output
- func (g *Graph) Insert(data *DataOptsParams) error
- func (g *Graph) IsCNAMENode(data *DataOptsParams) bool
- func (g *Graph) MarkAsRead(data *DataOptsParams) error
- func (g *Graph) String() string
- func (g *Graph) VizData(uuid string) ([]viz.Node, []viz.Edge)
- type Gremlin
- func (g *Gremlin) Close()
- func (g *Gremlin) EnumerationDateRange(uuid string) (time.Time, time.Time)
- func (g *Gremlin) EnumerationDomains(uuid string) []string
- func (g *Gremlin) EnumerationList() []string
- func (g *Gremlin) GetOutput(uuid string, marked bool) []*requests.Output
- func (g *Gremlin) Insert(data *DataOptsParams) error
- func (g *Gremlin) IsCNAMENode(data *DataOptsParams) bool
- func (g *Gremlin) MarkAsRead(data *DataOptsParams) error
- func (g *Gremlin) String() string
- func (g *Gremlin) VizData(uuid string) ([]viz.Node, []viz.Edge)
Constants ¶
const ( OptDomain = "domain" OptSubdomain = "subdomain" OptCNAME = "cname" OptA = "a" OptAAAA = "aaaa" OptPTR = "ptr" OptSRV = "service" OptNS = "ns" OptMX = "mx" OptInfrastructure = "infrastructure" )
These strings represent the various Amass data operations.
const ( // GremlinMaxConnections defines the limited number of concurrent connections to the Gremlin Server. GremlinMaxConnections int = 25 )
Variables ¶
This section is empty.
Functions ¶
func DataOptsDriver ¶
func DataOptsDriver(data []DataOptsParams, handler DataHandler) error
DataOptsDriver uses a slice of DataOptsParams to populate another Amass DataHandler.
Types ¶
type DataHandler ¶
type DataHandler interface { fmt.Stringer // Inserts data operations into the graph. Insert(data *DataOptsParams) error // Returns a list of enumeration IDs found in the data. EnumerationList() []string // Returns the domains that were involved in the provided enumeration. EnumerationDomains(uuid string) []string // Returns the date range associated with the provided enumeration UUID. EnumerationDateRange(uuid string) (time.Time, time.Time) // Returns complete paths in the graph, with the option of only unmarked results. GetOutput(uuid string, marked bool) []*requests.Output // Sets a 'read' property on the vertex matching Name, Domain and UUID. MarkAsRead(data *DataOptsParams) error // Return true if the Name, Domain and UUID match a CNAME in the graph. IsCNAMENode(data *DataOptsParams) bool // VizData returns the current state of the Graph as viz package Nodes and Edges. VizData(uuid string) ([]viz.Node, []viz.Edge) // Signals the handler to prepare for closing. Close() }
DataHandler is the interface for storage of Amass data operations.
type DataOptsHandler ¶
DataOptsHandler is the object that implements the DataHandler interface for JSON files.
func NewDataOptsHandler ¶
func NewDataOptsHandler(w io.Writer) *DataOptsHandler
NewDataOptsHandler returns a JSON file handler for Amass data operations.
func (*DataOptsHandler) Close ¶
func (d *DataOptsHandler) Close()
Close implements the Amass DataHandler interface.
func (*DataOptsHandler) EnumerationDateRange ¶
EnumerationDateRange returns the date range associated with the provided enumeration UUID.
func (*DataOptsHandler) EnumerationDomains ¶
func (d *DataOptsHandler) EnumerationDomains(uuid string) []string
EnumerationDomains returns the domains that were involved in the provided enumeration.
func (*DataOptsHandler) EnumerationList ¶
func (d *DataOptsHandler) EnumerationList() []string
EnumerationList returns a list of enumeration IDs found in the data.
func (*DataOptsHandler) GetOutput ¶
func (d *DataOptsHandler) GetOutput(uuid string, marked bool) []*requests.Output
GetOutput implements the Amass DataHandler interface.
func (*DataOptsHandler) Insert ¶
func (d *DataOptsHandler) Insert(data *DataOptsParams) error
Insert implements the Amass DataHandler interface.
func (*DataOptsHandler) IsCNAMENode ¶
func (d *DataOptsHandler) IsCNAMENode(data *DataOptsParams) bool
IsCNAMENode implements the Amass DataHandler interface.
func (*DataOptsHandler) MarkAsRead ¶
func (d *DataOptsHandler) MarkAsRead(data *DataOptsParams) error
MarkAsRead implements the Amass DataHandler interface.
func (*DataOptsHandler) String ¶
func (d *DataOptsHandler) String() string
String returns a description for the DataOptsHandler object.
type DataOptsParams ¶
type DataOptsParams struct { UUID string `json:"uuid"` Timestamp string `json:"timestamp"` Type string `json:"type"` Name string `json:"name"` Domain string `json:"domain"` Service string `json:"service"` TargetName string `json:"target_name"` TargetDomain string `json:"target_domain"` Address string `json:"addr"` ASN int `json:"asn"` CIDR string `json:"cidr"` Description string `json:"desc"` Tag string `json:"tag"` Source string `json:"source"` }
DataOptsParams defines the parameters for Amass data operations.
func ParseDataOpts ¶
func ParseDataOpts(r io.Reader) ([]DataOptsParams, error)
ParseDataOpts decodes JSON entries provided via a Reader and returns a DataOptsParams slice.
type Graph ¶
Graph is the object for managing a network infrastructure link graph.
func (*Graph) EnumerationDateRange ¶
EnumerationDateRange returns the date range associated with the provided enumeration UUID.
func (*Graph) EnumerationDomains ¶
EnumerationDomains returns the domains that were involved in the provided enumeration.
func (*Graph) EnumerationList ¶
EnumerationList returns a list of enumeration IDs found in the data.
func (*Graph) Insert ¶
func (g *Graph) Insert(data *DataOptsParams) error
Insert implements the Amass DataHandler interface.
func (*Graph) IsCNAMENode ¶
func (g *Graph) IsCNAMENode(data *DataOptsParams) bool
IsCNAMENode implements the Amass DataHandler interface.
func (*Graph) MarkAsRead ¶
func (g *Graph) MarkAsRead(data *DataOptsParams) error
MarkAsRead implements the Amass DataHandler interface.
type Gremlin ¶
Gremlin is the client object for a Gremlin/TinkerPop graph database connection.
func NewGremlin ¶
NewGremlin returns a client object that implements the Amass DataHandler interface. The url param typically looks like the following: ws://localhost:8182
func (*Gremlin) EnumerationDateRange ¶
EnumerationDateRange returns the date range associated with the provided enumeration UUID.
func (*Gremlin) EnumerationDomains ¶
EnumerationDomains returns the domains that were involved in the provided enumeration.
func (*Gremlin) EnumerationList ¶
EnumerationList returns a list of enumeration IDs found in the data.
func (*Gremlin) Insert ¶
func (g *Gremlin) Insert(data *DataOptsParams) error
Insert implements the Amass DataHandler interface.
func (*Gremlin) IsCNAMENode ¶
func (g *Gremlin) IsCNAMENode(data *DataOptsParams) bool
IsCNAMENode implements the Amass DataHandler interface.
func (*Gremlin) MarkAsRead ¶
func (g *Gremlin) MarkAsRead(data *DataOptsParams) error
MarkAsRead implements the Amass DataHandler interface.