| 1 | package outputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ |
| 2 | |
| 3 | import ( |
| 4 | "crypto/md5scip-go gomod github.com/golang/go/src go1.18 `crypto/md5`/" |
| 5 | "encoding/jsonscip-go gomod github.com/golang/go/src go1.18 `encoding/json`/" |
| 6 | "fmtscip-go gomod github.com/golang/go/src go1.18 fmt/" |
| 7 | "osscip-go gomod github.com/golang/go/src go1.18 os/" |
| 8 | "pathscip-go gomod github.com/golang/go/src go1.18 path/" |
| 9 | "sortscip-go gomod github.com/golang/go/src go1.18 sort/" |
| 10 | "strconvscip-go gomod github.com/golang/go/src go1.18 strconv/" |
| 11 | "stringsscip-go gomod github.com/golang/go/src go1.18 strings/" |
| 12 | "timescip-go gomod github.com/golang/go/src go1.18 time/" |
| 13 | |
| 14 | "github.com/ffuf/ffuf/v2/pkg/ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/" |
| 15 | ) |
| 16 | |
| 17 | const ( |
| 18 | BANNER_HEADERscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/BANNER_HEADER. = ` |
| 19 | /'___\ /'___\ /'___\ |
| 20 | /\ \__/ /\ \__/ __ __ /\ \__/ |
| 21 | \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ |
| 22 | \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ |
| 23 | \ \_\ \ \_\ \ \____/ \ \_\ |
| 24 | \/_/ \/_/ \/___/ \/_/ |
| 25 | ` |
| 26 | BANNER_SEPscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/BANNER_SEP. = "________________________________________________" |
| 27 | ) |
| 28 | |
| 29 | type Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput# struct { |
| 30 | configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config. *ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config# |
| 31 | fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords. []string |
| 32 | Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results. []ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result# |
| 33 | CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults. []ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result# |
| 34 | } |
| 35 | |
| 36 | func NewStdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/NewStdoutput().(conf *ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#) *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput# { |
| 37 | var outp Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput# |
| 38 | outp.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config. = conf |
| 39 | outp.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results. = make([]ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#, 0) |
| 40 | outp.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults. = make([]ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#, 0) |
| 41 | outp.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords. = make([]string, 0) |
| 42 | for _, ip := range conf.InputProvidersscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#InputProviders. { |
| 43 | outp.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords. = append(outp.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords., ip.Keywordscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/InputProviderConfig#Keyword.) |
| 44 | } |
| 45 | sortscip-go gomod github.com/golang/go/src go1.18 sort/.Stringsscip-go gomod github.com/golang/go/src go1.18 sort/Strings().(outp.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords.) |
| 46 | return &outp |
| 47 | } |
| 48 | |
| 49 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Bannerscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Banner().() { |
| 50 | version := stringsscip-go gomod github.com/golang/go/src go1.18 strings/.ReplaceAllscip-go gomod github.com/golang/go/src go1.18 strings/ReplaceAll().(ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.FormattedVersionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/FormattedVersion().(), "<3", fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s<3%s", ANSI_REDscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_RED., ANSI_CLEARscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_CLEAR.)) |
| 51 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s\n %s\n%s\n\n", BANNER_HEADERscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/BANNER_HEADER., version, BANNER_SEPscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/BANNER_SEP.) |
| 52 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Method"), []byte(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Methodscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Method.)) |
| 53 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("URL"), []byte(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Urlscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Url.)) |
| 54 | |
| 55 | // Print wordlists |
| 56 | for _, provider := range s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..InputProvidersscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#InputProviders. { |
| 57 | if provider.Namescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/InputProviderConfig#Name. == "wordlist" { |
| 58 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Wordlist"), []byte(provider.Keywordscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/InputProviderConfig#Keyword.+": "+provider.Valuescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/InputProviderConfig#Value.)) |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | // Print headers |
| 63 | if len(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Headersscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Headers.) > 0 { |
| 64 | for k, v := range s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Headersscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Headers. { |
| 65 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Header"), []byte(fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s: %s", k, v))) |
| 66 | } |
| 67 | } |
| 68 | // Print POST data |
| 69 | if len(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Datascip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Data.) > 0 { |
| 70 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Data"), []byte(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Datascip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Data.)) |
| 71 | } |
| 72 | |
| 73 | // Print extensions |
| 74 | if len(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Extensionsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Extensions.) > 0 { |
| 75 | exts := "" |
| 76 | for _, ext := range s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Extensionsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Extensions. { |
| 77 | exts = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s ", exts, ext) |
| 78 | } |
| 79 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Extensions"), []byte(exts)) |
| 80 | } |
| 81 | |
| 82 | // Output file info |
| 83 | if len(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile.) > 0 { |
| 84 | |
| 85 | // Use filename as specified by user |
| 86 | OutputFile := s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. |
| 87 | |
| 88 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFormatscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFormat. == "all" { |
| 89 | // Actually... append all extensions |
| 90 | OutputFile += ".{json,ejson,html,md,csv,ecsv}" |
| 91 | } |
| 92 | |
| 93 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Output file"), []byte(OutputFile)) |
| 94 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("File format"), []byte(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFormatscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFormat.)) |
| 95 | } |
| 96 | |
| 97 | // Follow redirects? |
| 98 | follow := fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%t", s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..FollowRedirectsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#FollowRedirects.) |
| 99 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Follow redirects"), []byte(follow)) |
| 100 | |
| 101 | // Autocalibration |
| 102 | autocalib := fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%t", s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..AutoCalibrationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#AutoCalibration.) |
| 103 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Calibration"), []byte(autocalib)) |
| 104 | |
| 105 | // Proxies |
| 106 | if len(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..ProxyURLscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#ProxyURL.) > 0 { |
| 107 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Proxy"), []byte(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..ProxyURLscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#ProxyURL.)) |
| 108 | } |
| 109 | if len(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..ReplayProxyURLscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#ReplayProxyURL.) > 0 { |
| 110 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("ReplayProxy"), []byte(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..ReplayProxyURLscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#ReplayProxyURL.)) |
| 111 | } |
| 112 | |
| 113 | // Timeout |
| 114 | timeout := fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%d", s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Timeoutscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Timeout.) |
| 115 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Timeout"), []byte(timeout)) |
| 116 | |
| 117 | // Threads |
| 118 | threads := fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%d", s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Threadsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Threads.) |
| 119 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Threads"), []byte(threads)) |
| 120 | |
| 121 | // Delay? |
| 122 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Delayscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Delay..HasDelayscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/optRange#HasDelay. { |
| 123 | delay := "" |
| 124 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Delayscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Delay..IsRangescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/optRange#IsRange. { |
| 125 | delay = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%.2f - %.2f seconds", s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Delayscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Delay..Minscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/optRange#Min., s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Delayscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Delay..Maxscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/optRange#Max.) |
| 126 | } else { |
| 127 | delay = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%.2f seconds", s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Delayscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Delay..Minscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/optRange#Min.) |
| 128 | } |
| 129 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Delay"), []byte(delay)) |
| 130 | } |
| 131 | |
| 132 | // Print matchers |
| 133 | for _, f := range s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..MatcherManagerscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#MatcherManager..GetMatchersscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/MatcherManager#GetMatchers.() { |
| 134 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Matcher"), []byte(f.ReprVerbosescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/FilterProvider#ReprVerbose.())) |
| 135 | } |
| 136 | // Print filters |
| 137 | for _, f := range s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..MatcherManagerscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#MatcherManager..GetFiltersscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/MatcherManager#GetFilters.() { |
| 138 | printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().([]byte("Filter"), []byte(f.ReprVerbosescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/FilterProvider#ReprVerbose.())) |
| 139 | } |
| 140 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s\n\n", BANNER_SEPscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/BANNER_SEP.) |
| 141 | } |
| 142 | |
| 143 | // Reset resets the result slice |
| 144 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Resetscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Reset().() { |
| 145 | s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults. = make([]ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#, 0) |
| 146 | } |
| 147 | |
| 148 | // Cycle moves the CurrentResults to Results and resets the results slice |
| 149 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Cyclescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Cycle().() { |
| 150 | s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results. = append(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results., s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults....) |
| 151 | s.Resetscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Reset().() |
| 152 | } |
| 153 | |
| 154 | // GetResults returns the result slice |
| 155 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) GetCurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#GetCurrentResults().() []ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result# { |
| 156 | return s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults. |
| 157 | } |
| 158 | |
| 159 | // SetResults sets the result slice |
| 160 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) SetCurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#SetCurrentResults().(results []ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#) { |
| 161 | s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults. = results |
| 162 | } |
| 163 | |
| 164 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Progressscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Progress().(status ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Progressscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Progress#) { |
| 165 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Quietscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Quiet. { |
| 166 | // No progress for quiet mode |
| 167 | return |
| 168 | } |
| 169 | |
| 170 | dur := timescip-go gomod github.com/golang/go/src go1.18 time/.Sincescip-go gomod github.com/golang/go/src go1.18 time/Since().(status.StartedAtscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Progress#StartedAt.) |
| 171 | runningSecs := int(dur / timescip-go gomod github.com/golang/go/src go1.18 time/.Secondscip-go gomod github.com/golang/go/src go1.18 time/Second.) |
| 172 | var reqRate int64 |
| 173 | if runningSecs > 0 { |
| 174 | reqRate = status.ReqSecscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Progress#ReqSec. |
| 175 | } else { |
| 176 | reqRate = 0 |
| 177 | } |
| 178 | |
| 179 | hours := dur / timescip-go gomod github.com/golang/go/src go1.18 time/.Hourscip-go gomod github.com/golang/go/src go1.18 time/Hour. |
| 180 | dur -= hours * timescip-go gomod github.com/golang/go/src go1.18 time/.Hourscip-go gomod github.com/golang/go/src go1.18 time/Hour. |
| 181 | mins := dur / timescip-go gomod github.com/golang/go/src go1.18 time/.Minutescip-go gomod github.com/golang/go/src go1.18 time/Minute. |
| 182 | dur -= mins * timescip-go gomod github.com/golang/go/src go1.18 time/.Minutescip-go gomod github.com/golang/go/src go1.18 time/Minute. |
| 183 | secs := dur / timescip-go gomod github.com/golang/go/src go1.18 time/.Secondscip-go gomod github.com/golang/go/src go1.18 time/Second. |
| 184 | |
| 185 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s:: Progress: [%d/%d] :: Job [%d/%d] :: %d req/sec :: Duration: [%d:%02d:%02d] :: Errors: %d ::", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., status.ReqCountscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Progress#ReqCount., status.ReqTotalscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Progress#ReqTotal., status.QueuePosscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Progress#QueuePos., status.QueueTotalscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Progress#QueueTotal., reqRate, hours, mins, secs, status.ErrorCountscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Progress#ErrorCount.) |
| 186 | } |
| 187 | |
| 188 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Infoscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Info().(infostring string) { |
| 189 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Quietscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Quiet. { |
| 190 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s", infostring) |
| 191 | } else { |
| 192 | if !s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Colorsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Colors. { |
| 193 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s[INFO] %s\n\n", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., infostring) |
| 194 | } else { |
| 195 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s[%sINFO%s] %s\n\n", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., ANSI_BLUEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_BLUE., ANSI_CLEARscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_CLEAR., infostring) |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(errstring string) { |
| 201 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Quietscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Quiet. { |
| 202 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s", errstring) |
| 203 | } else { |
| 204 | if !s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Colorsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Colors. { |
| 205 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s[ERR]Â %s\n", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., errstring) |
| 206 | } else { |
| 207 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s[%sERR%s] %s\n", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., ANSI_REDscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_RED., ANSI_CLEARscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_CLEAR., errstring) |
| 208 | } |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Warningscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Warning().(warnstring string) { |
| 213 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Quietscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Quiet. { |
| 214 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s", warnstring) |
| 215 | } else { |
| 216 | if !s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Colorsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Colors. { |
| 217 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s[WARN] %s\n", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., warnstring) |
| 218 | } else { |
| 219 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s[%sWARN%s] %s\n", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., ANSI_REDscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_RED., ANSI_CLEARscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_CLEAR., warnstring) |
| 220 | } |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Rawscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Raw().(output string) { |
| 225 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "%s%s", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., output) |
| 226 | } |
| 227 | |
| 228 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) writeToAllscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#writeToAll().(filename string, config *ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#, res []ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#) error { |
| 229 | var err error |
| 230 | var BaseFilename string = s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. |
| 231 | |
| 232 | // Go through each type of write, adding |
| 233 | // the suffix to each output file. |
| 234 | |
| 235 | s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. = BaseFilename + ".json" |
| 236 | err = writeJSONscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeJSON().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile., s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., res) |
| 237 | if err != nil { |
| 238 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 239 | } |
| 240 | |
| 241 | s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. = BaseFilename + ".ejson" |
| 242 | err = writeEJSONscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeEJSON().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile., s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., res) |
| 243 | if err != nil { |
| 244 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 245 | } |
| 246 | |
| 247 | s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. = BaseFilename + ".html" |
| 248 | err = writeHTMLscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeHTML().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile., s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., res) |
| 249 | if err != nil { |
| 250 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 251 | } |
| 252 | |
| 253 | s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. = BaseFilename + ".md" |
| 254 | err = writeMarkdownscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeMarkdown().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile., s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., res) |
| 255 | if err != nil { |
| 256 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 257 | } |
| 258 | |
| 259 | s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. = BaseFilename + ".csv" |
| 260 | err = writeCSVscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeCSV().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile., s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., res, false) |
| 261 | if err != nil { |
| 262 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 263 | } |
| 264 | |
| 265 | s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. = BaseFilename + ".ecsv" |
| 266 | err = writeCSVscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeCSV().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile., s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., res, true) |
| 267 | if err != nil { |
| 268 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 269 | } |
| 270 | |
| 271 | return nil |
| 272 | |
| 273 | } |
| 274 | |
| 275 | // SaveFile saves the current results to a file of a given type |
| 276 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) SaveFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#SaveFile().(filename, format string) error { |
| 277 | var err error |
| 278 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputSkipEmptyFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputSkipEmptyFile. && len(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results.) == 0 && len(s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults.) == 0 { |
| 279 | s.Infoscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Info().("No results and -or defined, output file not written.") |
| 280 | return err |
| 281 | } |
| 282 | switch format { |
| 283 | case "all": |
| 284 | err = s.writeToAllscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#writeToAll().(filename, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., append(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results., s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults....)) |
| 285 | case "json": |
| 286 | err = writeJSONscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeJSON().(filename, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., append(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results., s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults....)) |
| 287 | case "ejson": |
| 288 | err = writeEJSONscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeEJSON().(filename, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., append(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results., s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults....)) |
| 289 | case "html": |
| 290 | err = writeHTMLscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeHTML().(filename, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., append(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results., s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults....)) |
| 291 | case "md": |
| 292 | err = writeMarkdownscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeMarkdown().(filename, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., append(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results., s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults....)) |
| 293 | case "csv": |
| 294 | err = writeCSVscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeCSV().(filename, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., append(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results., s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults....), false) |
| 295 | case "ecsv": |
| 296 | err = writeCSVscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/writeCSV().(filename, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config., append(s.Resultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Results., s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults....), true) |
| 297 | } |
| 298 | return err |
| 299 | } |
| 300 | |
| 301 | // Finalize gets run after all the ffuf jobs are completed |
| 302 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Finalizescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Finalize().() error { |
| 303 | var err error |
| 304 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile. != "" { |
| 305 | err = s.SaveFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#SaveFile().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFile., s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputFormatscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputFormat.) |
| 306 | if err != nil { |
| 307 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 308 | } |
| 309 | } |
| 310 | if !s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Quietscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Quiet. { |
| 311 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., "\n") |
| 312 | } |
| 313 | return nil |
| 314 | } |
| 315 | |
| 316 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Result().(resp ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Responsescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#) { |
| 317 | // Do we want to write request and response to a file |
| 318 | if len(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputDirectoryscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputDirectory.) > 0 { |
| 319 | resp.ResultFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#ResultFile. = s.writeResultToFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#writeResultToFile().(resp) |
| 320 | } |
| 321 | |
| 322 | inputs := make(map[string][]byte, len(resp.Requestscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#Request..Inputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Request#Input.)) |
| 323 | for k, v := range resp.Requestscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#Request..Inputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Request#Input. { |
| 324 | inputs[k] = v |
| 325 | } |
| 326 | sResult := ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#{ |
| 327 | Inputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Input.: inputs, |
| 328 | Positionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Position.: resp.Requestscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#Request..Positionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Request#Position., |
| 329 | StatusCodescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#StatusCode.: resp.StatusCodescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#StatusCode., |
| 330 | ContentLengthscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentLength.: resp.ContentLengthscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#ContentLength., |
| 331 | ContentWordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentWords.: resp.ContentWordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#ContentWords., |
| 332 | ContentLinesscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentLines.: resp.ContentLinesscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#ContentLines., |
| 333 | ContentTypescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentType.: resp.ContentTypescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#ContentType., |
| 334 | RedirectLocationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#RedirectLocation.: resp.GetRedirectLocationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#GetRedirectLocation().(false), |
| 335 | ScraperDatascip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ScraperData.: resp.ScraperDatascip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#ScraperData., |
| 336 | Urlscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Url.: resp.Requestscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#Request..Urlscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Request#Url., |
| 337 | Durationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Duration.: resp.Durationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#Duration., |
| 338 | ResultFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ResultFile.: resp.ResultFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#ResultFile., |
| 339 | Hostscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Host.: resp.Requestscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#Request..Hostscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Request#Host., |
| 340 | } |
| 341 | s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults. = append(s.CurrentResultsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#CurrentResults., sResult) |
| 342 | // Output the result |
| 343 | s.PrintResultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#PrintResult().(sResult) |
| 344 | } |
| 345 | |
| 346 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) writeResultToFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#writeResultToFile().(resp ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Responsescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#) string { |
| 347 | var fileContent, fileName, filePath string |
| 348 | // Create directory if needed |
| 349 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputDirectoryscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputDirectory. != "" { |
| 350 | err := osscip-go gomod github.com/golang/go/src go1.18 os/.MkdirAllscip-go gomod github.com/golang/go/src go1.18 os/MkdirAll().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputDirectoryscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputDirectory., 0750) |
| 351 | if err != nil { |
| 352 | if !osscip-go gomod github.com/golang/go/src go1.18 os/.IsExistscip-go gomod github.com/golang/go/src go1.18 os/IsExist().(err) { |
| 353 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 354 | return "" |
| 355 | } |
| 356 | } |
| 357 | } |
| 358 | fileContent = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s\n---- ↑ Request ---- Response ↓ ----\n\n%s", resp.Requestscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#Request..Rawscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Request#Raw., resp.Rawscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Response#Raw.) |
| 359 | |
| 360 | // Create file name |
| 361 | fileName = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%x", md5scip-go gomod github.com/golang/go/src go1.18 `crypto/md5`/.Sumscip-go gomod github.com/golang/go/src go1.18 `crypto/md5`/Sum().([]byte(fileContent))) |
| 362 | |
| 363 | filePath = pathscip-go gomod github.com/golang/go/src go1.18 path/.Joinscip-go gomod github.com/golang/go/src go1.18 path/Join().(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputDirectoryscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputDirectory., fileName) |
| 364 | err := osscip-go gomod github.com/golang/go/src go1.18 os/.WriteFilescip-go gomod github.com/golang/go/src go1.18 os/WriteFile().(filePath, []byte(fileContent), 0640) |
| 365 | if err != nil { |
| 366 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 367 | } |
| 368 | return fileName |
| 369 | } |
| 370 | |
| 371 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) PrintResultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#PrintResult().(res ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#) { |
| 372 | switch { |
| 373 | case s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Jsonscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Json.: |
| 374 | s.resultJsonscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#resultJson().(res) |
| 375 | case s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Quietscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Quiet.: |
| 376 | s.resultQuietscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#resultQuiet().(res) |
| 377 | case len(s.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords.) > 1 || s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Verbosescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Verbose. || len(s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..OutputDirectoryscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#OutputDirectory.) > 0 || len(res.ScraperDatascip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ScraperData.) > 0: |
| 378 | // Print a multi-line result (when using multiple input keywords and wordlists) |
| 379 | s.resultMultilinescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#resultMultiline().(res) |
| 380 | default: |
| 381 | s.resultNormalscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#resultNormal().(res) |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) prepareInputsOneLinescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#prepareInputsOneLine().(res ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#) string { |
| 386 | inputs := "" |
| 387 | if len(s.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords.) > 1 { |
| 388 | for _, k := range s.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords. { |
| 389 | if ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.StrInSlicescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/StrInSlice().(k, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..CommandKeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#CommandKeywords.) { |
| 390 | // If we're using external command for input, display the position instead of input |
| 391 | inputs = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s : %s ", inputs, k, strconvscip-go gomod github.com/golang/go/src go1.18 strconv/.Itoascip-go gomod github.com/golang/go/src go1.18 strconv/Itoa().(res.Positionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Position.)) |
| 392 | } else { |
| 393 | inputs = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s : %s ", inputs, k, res.Inputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Input.[k]) |
| 394 | } |
| 395 | } |
| 396 | } else { |
| 397 | for _, k := range s.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords. { |
| 398 | if ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.StrInSlicescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/StrInSlice().(k, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..CommandKeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#CommandKeywords.) { |
| 399 | // If we're using external command for input, display the position instead of input |
| 400 | inputs = strconvscip-go gomod github.com/golang/go/src go1.18 strconv/.Itoascip-go gomod github.com/golang/go/src go1.18 strconv/Itoa().(res.Positionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Position.) |
| 401 | } else { |
| 402 | inputs = string(res.Inputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Input.[k]) |
| 403 | } |
| 404 | } |
| 405 | } |
| 406 | return inputs |
| 407 | } |
| 408 | |
| 409 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) resultQuietscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#resultQuiet().(res ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#) { |
| 410 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Printlnscip-go gomod github.com/golang/go/src go1.18 fmt/Println().(s.prepareInputsOneLinescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#prepareInputsOneLine().(res)) |
| 411 | } |
| 412 | |
| 413 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) resultMultilinescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#resultMultiline().(res ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#) { |
| 414 | var res_hdr, res_str string |
| 415 | res_str = "%s%s * %s: %s\n" |
| 416 | res_hdr = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s[Status: %d, Size: %d, Words: %d, Lines: %d, Duration: %dms]%s", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., s.colorizescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#colorize().(res.StatusCodescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#StatusCode.), res.StatusCodescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#StatusCode., res.ContentLengthscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentLength., res.ContentWordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentWords., res.ContentLinesscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentLines., res.Durationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Duration..Millisecondsscip-go gomod github.com/golang/go/src go1.18 time/Duration#Milliseconds().(), ANSI_CLEARscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_CLEAR.) |
| 417 | reslines := "" |
| 418 | if s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Verbosescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Verbose. { |
| 419 | reslines = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s| URL | %s\n", reslines, TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., res.Urlscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Url.) |
| 420 | redirectLocation := res.RedirectLocationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#RedirectLocation. |
| 421 | if redirectLocation != "" { |
| 422 | reslines = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s| --> | %s\n", reslines, TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., redirectLocation) |
| 423 | } |
| 424 | } |
| 425 | if res.ResultFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ResultFile. != "" { |
| 426 | reslines = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s| RES | %s\n", reslines, TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., res.ResultFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ResultFile.) |
| 427 | } |
| 428 | for _, k := range s.fuzzkeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#fuzzkeywords. { |
| 429 | if ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.StrInSlicescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/StrInSlice().(k, s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..CommandKeywordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#CommandKeywords.) { |
| 430 | // If we're using external command for input, display the position instead of input |
| 431 | reslines = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().(res_str, reslines, TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., k, strconvscip-go gomod github.com/golang/go/src go1.18 strconv/.Itoascip-go gomod github.com/golang/go/src go1.18 strconv/Itoa().(res.Positionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Position.)) |
| 432 | } else { |
| 433 | // Wordlist input |
| 434 | reslines = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().(res_str, reslines, TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., k, res.Inputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Input.[k]) |
| 435 | } |
| 436 | } |
| 437 | if len(res.ScraperDatascip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ScraperData.) > 0 { |
| 438 | reslines = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s| SCR |\n", reslines, TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE.) |
| 439 | for k, vslice := range res.ScraperDatascip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ScraperData. { |
| 440 | for _, v := range vslice { |
| 441 | reslines = fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().(res_str, reslines, TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., k, v) |
| 442 | } |
| 443 | } |
| 444 | } |
| 445 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Printfscip-go gomod github.com/golang/go/src go1.18 fmt/Printf().("%s\n%s\n", res_hdr, reslines) |
| 446 | } |
| 447 | |
| 448 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) resultNormalscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#resultNormal().(res ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#) { |
| 449 | resnormal := fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%s%s%-23s [Status: %d, Size: %d, Words: %d, Lines: %d, Duration: %dms]%s", TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE., s.colorizescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#colorize().(res.StatusCodescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#StatusCode.), s.prepareInputsOneLinescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#prepareInputsOneLine().(res), res.StatusCodescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#StatusCode., res.ContentLengthscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentLength., res.ContentWordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentWords., res.ContentLinesscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentLines., res.Durationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Duration..Millisecondsscip-go gomod github.com/golang/go/src go1.18 time/Duration#Milliseconds().(), ANSI_CLEARscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_CLEAR.) |
| 450 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Printlnscip-go gomod github.com/golang/go/src go1.18 fmt/Println().(resnormal) |
| 451 | } |
| 452 | |
| 453 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) resultJsonscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#resultJson().(res ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#) { |
| 454 | resBytes, err := jsonscip-go gomod github.com/golang/go/src go1.18 `encoding/json`/.Marshalscip-go gomod github.com/golang/go/src go1.18 `encoding/json`/Marshal().(res) |
| 455 | if err != nil { |
| 456 | s.Errorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#Error().(err.Error()) |
| 457 | } else { |
| 458 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.18 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., TERMINAL_CLEAR_LINEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TERMINAL_CLEAR_LINE.) |
| 459 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Printlnscip-go gomod github.com/golang/go/src go1.18 fmt/Println().(string(resBytes)) |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | func (s *Stdoutputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#) colorizescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#colorize().(status int64) string { |
| 464 | if !s.configscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/Stdoutput#config..Colorsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Config#Colors. { |
| 465 | return "" |
| 466 | } |
| 467 | colorCode := ANSI_CLEARscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_CLEAR. |
| 468 | if status >= 200 && status < 300 { |
| 469 | colorCode = ANSI_GREENscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_GREEN. |
| 470 | } |
| 471 | if status >= 300 && status < 400 { |
| 472 | colorCode = ANSI_BLUEscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_BLUE. |
| 473 | } |
| 474 | if status >= 400 && status < 500 { |
| 475 | colorCode = ANSI_YELLOWscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_YELLOW. |
| 476 | } |
| 477 | if status >= 500 && status < 600 { |
| 478 | colorCode = ANSI_REDscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ANSI_RED. |
| 479 | } |
| 480 | return colorCode |
| 481 | } |
| 482 | |
| 483 | func printOptionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/printOption().(name []byte, value []byte) { |
| 484 | fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.18 os/.Stderrscip-go gomod github.com/golang/go/src go1.18 os/Stderr., " :: %-16s : %s\n", name, value) |
| 485 | } |