storage

package
v0.0.0-...-7228826 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package storage provides intofaces into an sqlite database for storing found subdomains.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client holds the sql dependency.

func New

func New(dbName string) (*Client, error)

New returns a new db client and creates tables if this is the first run.

func (*Client) InsertDomain

func (c *Client) InsertDomain(domain *Domain) error

InsertDomain inserts a domain into the db.

func (*Client) InsertPort

func (c *Client) InsertPort(port *Port) error

InsertPort inserts a port into the db.

func (*Client) InsertSubdomain

func (c *Client) InsertSubdomain(subdomain *Subdomain) error

InsertSubdomain inserts a subdomain into the db.

func (*Client) PortExists

func (c *Client) PortExists(port *Port) (bool, error)

PortExists returns whether a port has already been inserted.

func (*Client) SubdomainExists

func (c *Client) SubdomainExists(subdomain *Subdomain) (bool, error)

SubdomainExists returns whether a subdomain has already been inserted.

type Domain

type Domain struct {
	Name       string
	Subdomains []Subdomain
}

Domain represents a domain.

type Port

type Port struct {
	Number    int
	Subdomain string
	Protocol  string
	Service   string
	Product   string
	Version   string
	// File containing a screenshot of the web server
	Screenshot string
}

Port represents a port.

type Subdomain

type Subdomain struct {
	Name     string
	Domain   string
	Ports    []*Port
	Takeover string
}

Subdomain represents a subdomain.

Jump to

Keyboard shortcuts

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