output

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CariddiOutputFolder = "output-cariddi"
)

Variables

View Source
var (
	ErrHTTPResp = errors.New("cannot store HTTP response")
)

Functions

func AppendOutputToHTML

func AppendOutputToHTML(output string, status string, filename string, isLink bool)

AppendOutputToHTML appends the output to html file.

func AppendOutputToTxt

func AppendOutputToTxt(output string, filename string)

AppendOutputToTxt opens the output file and append the string taken as input.

func Banner()

Banner prints the banner + version.

func BannerFooterHTML

func BannerFooterHTML(filename string)

BannerFooterHTML appends the final footer.

func BannerHTML

func BannerHTML(filename string)

BannerHTML appends the initial banner to html file.

func EncapsulateCustomGreen

func EncapsulateCustomGreen(alert string, inp string)

EncapsulateCustomGreen takes as input a string and print it with the green color.

func EncapsulateCustomRed

func EncapsulateCustomRed(alert string, inp string)

EncapsulateCustomRed takes as input a string and print it with the red color.

func EncapsulateCustomYellow

func EncapsulateCustomYellow(alert string, inp string)

EncapsulateCustomYellow takes as input a string and print it with the yellow color.

func EncapsulateGreen

func EncapsulateGreen(inp string)

EncapsulateGreen takes as input a string and print a green prefix.

func EncapsulateRed

func EncapsulateRed(inp string)

EncapsulateRed takes as input a string and print a red prefix.

func EncapsulateYellow

func EncapsulateYellow(inp string)

EncapsulateYellow takes as input a string and print a yellow prefix.

func FooterHTML

func FooterHTML(filename string)

FooterHTML appends the footer.

func FormatResponse added in v1.3.2

func FormatResponse(resp *colly.Response) ([]byte, error)

FormatResponse formats an HTTP response ready to be written in a file.

func GetJSONString added in v1.3.1

func GetJSONString(
	r *colly.Response,
	secrets []scanner.SecretMatched,
	parameters []scanner.Parameter,
	filetype *scanner.FileType,
	errors []scanner.ErrorMatched,
	infos []scanner.InfoMatched,
) ([]byte, error)

func HTMLOutput

func HTMLOutput(flags input.Input, resultFilename string, finalResults []string, finalSecret []scanner.SecretMatched,
	finalEndpoints []scanner.EndpointMatched, finalExtensions []scanner.FileTypeMatched,
	finalErrors []scanner.ErrorMatched, finalInfos []scanner.InfoMatched)

HtmlOutput it's the wrapper around all the html things. Actually it manages everything related to HTML output.

func HeaderHTML

func HeaderHTML(header string, filename string)

HeaderHTML appends the html header.

func PrintExamples

func PrintExamples()

PrintExamples prints some examples.

func PrintHelp

func PrintHelp()

PrintHelp prints the help.

func PrintSimpleOutput

func PrintSimpleOutput(out []string)

PrintSimpleOutput prints line by line.

func StoreHTTPResponse added in v1.3.2

func StoreHTTPResponse(r *colly.Response) error

StoreHTTPResponse stores an HTTP response in a file. If it fails returns an error.

func TxtOutput

func TxtOutput(flags input.Input, finalResults []string, finalSecret []scanner.SecretMatched,
	finalEndpoints []scanner.EndpointMatched, finalExtensions []scanner.FileTypeMatched,
	finalErrors []scanner.ErrorMatched, finalInfos []scanner.InfoMatched)

TxtOutput it's the wrapper around all the txt things. Actually it manages everything related to TXT output.

func UpdateIndex added in v1.3.2

func UpdateIndex(resp *colly.Response) error

UpdateIndex updates the index file with the correct information linking to HTTP responses files. If it fails returns an error.

func WriteHTTPResponse added in v1.3.2

func WriteHTTPResponse(inputURL *url.URL, response []byte) error

WriteHTTPResponse creates an HTTP response output file and writes the HTTP response inside it. If it fails returns an error.

Types

type JSONData added in v1.3.1

type JSONData struct {
	URL           string          `json:"url"`
	Method        string          `json:"method"`
	StatusCode    int             `json:"status_code"`
	Words         int             `json:"words"`
	Lines         int             `json:"lines"`
	ContentType   string          `json:"content_type,omitempty"`
	ContentLength int             `json:"content_length,omitempty"`
	Matches       *MatcherResults `json:"matches,omitempty"`
}

type MatcherResult added in v1.3.1

type MatcherResult struct {
	Name  string `json:"name"`
	Match string `json:"match"`
}

type MatcherResults added in v1.3.1

type MatcherResults struct {
	FileType   *scanner.FileType   `json:"filetype,omitempty"`
	Parameters []scanner.Parameter `json:"parameters,omitempty"`
	Errors     []MatcherResult     `json:"errors,omitempty"`
	Infos      []MatcherResult     `json:"infos,omitempty"`
	Secrets    []MatcherResult     `json:"secrets,omitempty"`
}

Jump to

Keyboard shortcuts

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