Documentation
¶
Index ¶
- Constants
- Variables
- func AppendOutputToHTML(output string, status string, filename string, isLink bool)
- func AppendOutputToTxt(output string, filename string)
- func Banner()
- func BannerFooterHTML(filename string)
- func BannerHTML(filename string)
- func EncapsulateCustomGreen(alert string, inp string)
- func EncapsulateCustomRed(alert string, inp string)
- func EncapsulateCustomYellow(alert string, inp string)
- func EncapsulateGreen(inp string)
- func EncapsulateRed(inp string)
- func EncapsulateYellow(inp string)
- func FooterHTML(filename string)
- func FormatResponse(resp *colly.Response) ([]byte, error)
- func GetJSONString(r *colly.Response, secrets []scanner.SecretMatched, ...) ([]byte, error)
- func HTMLOutput(flags input.Input, resultFilename string, finalResults []string, ...)
- func HeaderHTML(header string, filename string)
- func PrintExamples()
- func PrintHelp()
- func PrintSimpleOutput(out []string)
- func StoreHTTPResponse(r *colly.Response) error
- func TxtOutput(flags input.Input, finalResults []string, finalSecret []scanner.SecretMatched, ...)
- func UpdateIndex(resp *colly.Response) error
- func WriteAllTxt(output []string, filename string)
- func WriteHTTPResponse(inputURL *url.URL, response []byte) error
- func WriteSummaryCard(filename string, results, secrets, endpoints, extensions, errors, infos int)
- type JSONData
- type MatcherResult
- type MatcherResults
Constants ¶
const ( HTMLBanner = `` /* 1516-byte string literal not displayed */ )
const ( CariddiOutputFolder = "output-cariddi" ResultFile = "results" SecretsFile = "secrets" EndpointsFile = "endpoints" ExtensionsFile = "extensions" ErrorsFile = "errors" InfosFile = "info" )
Variables ¶
var (
ErrHTTPResp = errors.New("cannot store HTTP response")
)
Functions ¶
func AppendOutputToHTML ¶
AppendOutputToHTML appends the output to html file.
func AppendOutputToTxt ¶
AppendOutputToTxt opens the output file and append the string taken as input.
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 ¶
EncapsulateCustomGreen takes as input a string and print it with the green color.
func EncapsulateCustomRed ¶
EncapsulateCustomRed takes as input a string and print it with the red color.
func EncapsulateCustomYellow ¶
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 FormatResponse ¶ added in v1.3.2
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 ¶
HeaderHTML appends the html header.
func PrintSimpleOutput ¶
func PrintSimpleOutput(out []string)
PrintSimpleOutput prints line by line.
func StoreHTTPResponse ¶ added in v1.3.2
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
UpdateIndex updates the index file with the correct information linking to HTTP responses files. If it fails returns an error.
func WriteAllTxt ¶ added in v1.4.0
WriteAllTxt opens the output file and append all the strings taken as input in one-shot operation.
func WriteHTTPResponse ¶ added in v1.3.2
WriteHTTPResponse creates an HTTP response output file and writes the HTTP response inside it. If it fails returns an error.
func WriteSummaryCard ¶ added in v1.4.0
WriteSummaryCard adds a summary card.
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 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"`
}