sources

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var All = []string{
	"alienvault",
	"anubis",
	"bufferover",
	"cebaidu",
	"certspotterv0",
	"chaos",
	"crtsh",
	"github",
	"hackertarget",
	"rapiddns",
	"riddler",
	"sonar",
	"sublist3r",
	"threatcrowd",
	"threatminer",
	"urlscan",
	"wayback",
	"ximcx",
}

All contains the list of all sources used by default.

Functions

func NewExtractor

func NewExtractor(domain string) (*regexp.Regexp, error)

NewExtractor creates a new regular expression to extract subdomains from text based on the given domain.

Types

type Keys

type Keys struct {
	Chaos  string   `json:"chaos"`
	GitHub []string `json:"github"`
}

Keys contains the current API Keys we have in store

type Session

type Session struct {
	// Extractor is the regex for subdomains created for each domain
	Extractor *regexp.Regexp
	// Keys is the API keys for the application
	Keys *Keys
	// Client is the current http client
	Client *fasthttp.Client
}

Session is the option passed to the source, an option is created uniquely for eac source.

func NewSession

func NewSession(domain string, keys *Keys) (*Session, error)

NewSession creates a new session object for a domain

func (*Session) Request

func (session *Session) Request(method, requestURL, cookies string, headers map[string]string, body io.Reader) (*fasthttp.Response, error)

Request makes any HTTP request to a URL with extended parameters

func (*Session) SimpleGet

func (session *Session) SimpleGet(getURL string) (*fasthttp.Response, error)

SimpleGet makes a simple GET request to a URL

type Source

type Source interface {
	// Run takes a domain as argument and a session object
	// which contains the extractor for subdomains, http client
	// and other stuff.
	Run(string, *Session) chan Subdomain
	// Name returns the name of the source
	Name() string
}

Source is an interface inherited by each passive source

type Subdomain

type Subdomain struct {
	Source string
	Value  string
}

Subdomain is a result structure returned by a source

Jump to

Keyboard shortcuts

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