pkg

package
v0.0.0-...-64e6441 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RESP_SPLIT_HEADER  = "Web_Cache"
	RESP_SPLIT_VALUE   = "Vulnerability_Scanner"
	NO_DUPE_HEADER     = 0
	DUPE_HEADER_BEFORE = 1
	DUPE_HEADER_AFTER  = 2
)
View Source
const NOOGPARAM = "NoOGParameter"

Variables

View Source
var (
	NoColor = 0
	Red     = 1
	Yellow  = 2
	Green   = 3
	Cyan    = 4
)
View Source
var (
	DefaultHeaders = []string{}/* 2921 elements not displayed */

	DefaultParameters = []string{}/* 6454 elements not displayed */

)

Functions

func CrawlUrls

func CrawlUrls(u string, added map[string]bool, excluded map[string]bool) []string

func DOS

func DOS() reportResult

Check for different DOS techniques

func ForwardHeadersTemplate

func ForwardHeadersTemplate(repResult *reportResult, headers []string, values []string, identifier string, poison string, duplicateHeaders int)

func GenerateHeaderString

func GenerateHeaderString() string

func GenerateReport

func GenerateReport(report Report, filePath string)

func InitClient

func InitClient()

func ParseFlags

func ParseFlags(vers string)

func Print

func Print(msg string, c int)

func PrintFatal

func PrintFatal(msg string)

func PrintLog

func PrintLog(msg string)

func PrintNewLine

func PrintNewLine()

func PrintVerbose

func PrintVerbose(msg string, c int, threshold int)

func RandomString

func RandomString(length int) string

RandomString generates a random string of the specified length

func ReadLocalFile

func ReadLocalFile(path string, name string) []string

func ScanCSS

func ScanCSS() reportResult

func ScanCookies

func ScanCookies() reportResult

Scan cookies for poisoning

func ScanFatGET

func ScanFatGET() reportResult

Check for fat GET

func ScanForwardingHeaders

func ScanForwardingHeaders() reportResult

func ScanHTTPRequestSmuggling

func ScanHTTPRequestSmuggling(proxyURL *url.URL) reportResult

func ScanHeaders

func ScanHeaders(headerList []string) reportResult

Scan headers for poisoning

func ScanParameterCloaking

func ScanParameterCloaking() reportResult

Check for Parameter Cloaking

func ScanParameterEncoding

func ScanParameterEncoding() reportResult

Check for Parameter Encoding

func ScanParameterPollution

func ScanParameterPollution() reportResult

Check for Parameter Pollution

func ScanParameters

func ScanParameters(parameterList []string) reportResult

Scan query parameters for poisoning

func TestWebCacheDeception

func TestWebCacheDeception() reportResult

Types

type CacheStruct

type CacheStruct struct {
	CBwasFound     bool
	CBisParameter  bool
	CBisHeader     bool
	CBisCookie     bool
	CBisHTTPMethod bool
	CBName         string

	NoCache       bool
	Indicator     string
	TimeIndicator bool
}

func CheckCache

func CheckCache(parameterList []string, headerList []string) (CacheStruct, bool, []error)

Check if the parameter "cb" (or any other defined by flag -cb), the headers "accept-encoding, accept, cookie, origin" or any cookie can be used as cachebuster

type ConfigStruct

type ConfigStruct struct {
	Threads                 int
	ReqRate                 float64
	Verbosity               int
	DoPost                  bool
	ContentType             string
	QuerySeparator          string
	CacheBuster             string
	TimeOut                 int
	DeclineCookies          bool
	Force                   bool
	UseHTTP                 bool
	ReasonTypes             string
	CLDiff                  int
	HMDiff                  int
	SkipTimebased           bool
	SkipWordlistCachebuster bool
	CacheHeader             string
	DisableColor            bool
	DisableStatusLine       bool
	IgnoreStatus            []int

	Recursivity int
	RecInclude  string
	RecExclude  []string
	RecDomains  []string
	RecLimit    int

	Urls       []string
	Cookies    []string
	Headers    []string
	Parameters []string
	Body       string

	OnlyTest string
	SkipTest string

	GeneratePath      string
	GenerateReport    bool
	EscapeJSON        bool
	GenerateCompleted bool
	GenerateLog       bool

	UseProxy bool
	ProxyURL string

	HeaderWordlist    string
	ParameterWordlist string

	Intitialized bool
	Limiter      *rate.Limiter `json:"-"`
	Website      WebsiteStruct `json:"-"`
}
var Config ConfigStruct

func ReadConfigFile

func ReadConfigFile() ConfigStruct

type FlagStruct

type FlagStruct struct {
	LongFlag    string
	ShortFlag   string
	Description string
}

type Report

type Report struct {
	Settings      reportSettings `json:"-"`
	Name          string         `json:"name"`
	Version       string         `json:"version"`
	Vulnerable    bool           `json:"foundVulnerabilities"`
	HasError      bool           `json:"hasError"`
	ErrorMessages []string       `json:"errorMessages"`
	Date          string         `json:"date"`
	Duration      string         `json:"duration"`
	Command       string         `json:"command"`

	Config *ConfigStruct `json:"config,omitempty"`

	Websites []ReportWebsite `json:"websites"`
}

type ReportWebsite

type ReportWebsite struct {
	URL            string         `json:"url"`
	Vulnerable     bool           `json:"isVulnerable"`
	HasError       bool           `json:"hasError"`
	CacheIndicator string         `json:"cacheIndicator"`
	CBwasFound     bool           `json:"cacheBusterFound"`
	CBName         string         `json:"cacheBuster"`
	ErrorMessages  []string       `json:"errorMessages"`
	Results        []reportResult `json:"results"`
}

type WebsiteStruct

type WebsiteStruct struct {
	Headers      map[string][]string
	Body         string
	Cookies      map[string]string
	Url          *url.URL
	UrlWOQueries string
	Queries      map[string]string
	StatusCode   int
	Cache        CacheStruct
	Domain       string
}

func GetWebsite

func GetWebsite(requrl string, setStatusCode bool, cacheBuster bool) (WebsiteStruct, error)

Simple get request to get the body of a normal response and the cookies

Jump to

Keyboard shortcuts

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