scanner

package
v0.0.0-...-0a870c4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package scanner ...

Package scanner ...

Package scanner ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Output  string     `json:"output"`
	Tests   []*Request `json:"tests"`
	Threads int        `json:"threads"`
	Timeout string     `json:"timeout"`
	Verbose bool       `json:"verbose"`
}

Conf structure to hold configuration settings for the scna

type Headers

type Headers map[string]string

Headers is a map of our header key,value pairs

type Request

type Request struct {
	URL     string  `json:"url"`
	Headers Headers `json:"headers"`
	Method  string  `json:"method"`
	Proxy   string  `json:"proxy"`
}

Request structure to hold configuration settings for each request

type Scanner

type Scanner struct {
	Results map[string][][]*Test
	// contains filtered or unexported fields
}

Scanner structure to hold the client connection we'll be making requests from as well as the scanner configuration and results from the scan

func New

func New(conf *Conf, log *log.Logger) *Scanner

New creates and returns a new scanner

func (*Scanner) CreateOutputFile

func (s *Scanner) CreateOutputFile(domain string, results [][]*Test) error

CreateOutputFile creates a new file and writes the test results to it

func (*Scanner) CreateTests

func (s *Scanner) CreateTests(domains []string, headers Headers, method, proxy string)

CreateTests initializes our array of tests

func (*Scanner) SaveResults

func (s *Scanner) SaveResults() error

SaveResults saves the scan results to the provided directory file.

func (*Scanner) Start

func (s *Scanner) Start()

Start begins the scanning procedure

type Test

type Test struct {
	Acao    string            `json:"access-control-allow-origins"`
	Acac    string            `json:"access-control-allow-credentials"`
	Headers map[string]string `json:"headers"`
	Method  string            `json:"method"`
	Origin  string            `json:"origin"`
	Test    string            `json:"test"`
	URL     string            `json:"url"`
}

Test struct holds all our data related to the test

Jump to

Keyboard shortcuts

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