pkg

package
v0.0.0-...-3298a21 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoColor = 0
	Red     = 1
	Yellow  = 2
	Green   = 3
	Cyan    = 4
)
View Source
var (
	Statistics map[string]int
)

Functions

func CrawlUrls

func CrawlUrls(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 bool)

func GenerateHeaderString

func GenerateHeaderString() string

func GenerateReport

func GenerateReport(report Report, currentDate string)

func ParseFlags

func ParseFlags(vers string)

func Print

func Print(msg string, c int)

func PrintFatal

func PrintFatal(msg string)

func PrintNewLine

func PrintNewLine()

func PrintVerbose

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

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 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(stat 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
	CLDiff         int
	HMDiff         int
	CacheHeader    string
	DisableColor   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

	ProxyCertPath string
	ProxyURL      string

	HeaderWordlist string
	QueryWordlist  string

	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"`
	ErrorMessages []string       `json:"errorMessages"`
	Results       []reportResult `json:"results"`
}

type WebsiteStruct

type WebsiteStruct struct {
	Headers      http.Header
	Body         string
	Cookies      []*http.Cookie
	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