scanner

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package scanner fetches and parses robots.txt, security.txt (RFC 9116) and a curated set of /.well-known/ paths for a list of targets. Every request is a plain GET of a standardized, publicly served file — no fuzzing, no exploitation. It is safe to run against authorized targets.

Index

Constants

View Source
const DefaultUserAgent = "SecurityChecker/1.0 (+https://github.com/11lunaric11/securitychecker)"

DefaultUserAgent is used when Options.UserAgent is empty.

Variables

This section is empty.

Functions

func BuildTargets

func BuildTargets(raw []string) []model.Target

BuildTargets normalizes and de-duplicates a list of raw strings, preserving first-seen order.

func Normalize

func Normalize(raw string) (t model.Target, ok bool)

Normalize turns a raw user string ("example.com", "https://x.com/path", "[host](https://host)", " # comment") into a base target. ok is false for blank/comment lines or input that cannot be parsed into a host.

Types

type Options

type Options struct {
	Concurrency    int           // max targets scanned at once
	Timeout        time.Duration // per-request timeout
	Delay          time.Duration // optional pause between requests to one host
	UserAgent      string        // User-Agent header sent on every request
	MaxBody        int64         // cap on bytes read per response
	ProbeWellKnown bool          // whether to probe the /.well-known/ list
}

Options configures a Scanner.

type Scanner

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

Scanner performs the scans. Create one with New and reuse it.

func New

func New(opts Options) *Scanner

New builds a Scanner with a shared, redirect-capped HTTP client.

func (*Scanner) ScanAll

func (s *Scanner) ScanAll(ctx context.Context, targets []model.Target) []model.Result

ScanAll scans every target concurrently and returns results in input order.

Jump to

Keyboard shortcuts

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