csprecon

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLSHandshakeTimeout = 10
	KeepAlive           = 30
	DomainRegex         = `(?i).*[a-z\_\-0-9]+\.[a-z]+`
	MinURLLength        = 4
)

Variables

This section is empty.

Functions

func CheckCSP added in v0.0.5

func CheckCSP(url, ua string, rCSP *regexp.Regexp, client *http.Client) ([]string, error)

CheckCSP returns the list of domains parsed from a URL found in CSP.

func CompileRegex

func CompileRegex(regex string) *regexp.Regexp

func ParseBodyCSP added in v0.0.5

func ParseBodyCSP(body io.Reader, rCSP *regexp.Regexp) []string

ParseBodyCSP returns the list of domains parsed from the CSP found in the meta tag of the input HTML body.

func ParseCSP added in v0.0.5

func ParseCSP(input string, r *regexp.Regexp) []string

ParseCSP returns the list of domains parsed from a raw CSP (string).

func PrepareURL added in v0.0.7

func PrepareURL(inputURL string) (string, error)

PrepareURL takes as input a string and prepares the input URL in order to get the favicon icon.

Types

type Runner

type Runner struct {
	Input     chan string
	Output    chan string
	Result    output.Result
	UserAgent string
	InWg      *sync.WaitGroup
	OutWg     *sync.WaitGroup
	Options   input.Options
	OutMutex  *sync.Mutex
}

func New

func New(options *input.Options) Runner

func (*Runner) Run

func (r *Runner) Run()

Jump to

Keyboard shortcuts

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