analyzer

package
v0.0.0-...-e09e6e9 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutputCSV

func OutputCSV(results []CookieResult) error

OutputCSV outputs the results in CSV format.

func OutputJSON

func OutputJSON(results []CookieResult) error

OutputJSON outputs the results in JSON format.

func OutputResults

func OutputResults(results []CookieResult, format string) error

OutputResults outputs the analysis results in the specified format.

func OutputText

func OutputText(results []CookieResult)

OutputText outputs the results in plain text format.

Types

type CookieResult

type CookieResult struct {
	Name            string   `json:"name"`
	HttpOnly        bool     `json:"httpOnly"`
	Secure          bool     `json:"secure"`
	SameSite        string   `json:"sameSite"`
	DomainScope     bool     `json:"domainScope"`
	PathScope       bool     `json:"pathScope"`
	Expiration      string   `json:"expiration"`
	Issues          []string `json:"issues"`
	Recommendations []string `json:"recommendations"`
}

CookieResult holds the analysis result for a single cookie.

func AnalyzeCookie

func AnalyzeCookie(cookie *http.Cookie, parsedURL *url.URL) CookieResult

AnalyzeCookie analyzes a single cookie and returns the result.

func ScanCookies

func ScanCookies(targetURL string, config utils.Config) []CookieResult

ScanCookies scans the cookies from the provided URL.

Jump to

Keyboard shortcuts

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