diff --git a/CHANGELOG.md b/CHANGELOG.md index ec032f4..0c62aa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,9 @@ - Changed - Explicitly allow TLS1.0 - Fix markdown output file format + - Fix csv output file format - Fixed divide by 0 error when setting rate limit to 0 manually. + - v2.0.0 - New diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ca1fae6..3f40dd0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -17,6 +17,7 @@ * [Ephex2](https://github.com/Ephex2) * [erbbysam](https://github.com/erbbysam) * [eur0pa](https://github.com/eur0pa) +* [gserrg](https://github.com/gserrg) * [fabiobauer](https://github.com/fabiobauer) * [fang0654](https://github.com/fang0654) * [haseobang](https://github.com/haseobang) diff --git a/pkg/output/file_csv.go b/pkg/output/file_csv.go index 8a7a767..da2d521 100644 --- a/pkg/output/file_csv.go +++ b/pkg/output/file_csv.go @@ -9,7 +9,7 @@ import ( "github.com/ffuf/ffuf/v2/pkg/ffuf" ) -var staticheaders = []string{"url", "redirectlocation", "position", "status_code", "content_length", "content_words", "content_lines", "content_type", "duration", "resultfile"} +var staticheaders = []string{"url", "redirectlocation", "position", "status_code", "content_length", "content_words", "content_lines", "content_type", "duration", "resultfile", "Ffufhash"} func writeCSV(filename string, config *ffuf.Config, res []ffuf.Result, encode bool) error { header := make([]string, 0) @@ -53,8 +53,13 @@ func base64encode(in []byte) string { func toCSV(r ffuf.Result) []string { res := make([]string, 0) - for _, v := range r.Input { - res = append(res, string(v)) + ffufhash := "" + for k, v := range r.Input { + if k == "FFUFHASH" { + ffufhash = string(v) + } else { + res = append(res, string(v)) + } } res = append(res, r.Url) res = append(res, r.RedirectLocation) @@ -66,5 +71,6 @@ func toCSV(r ffuf.Result) []string { res = append(res, r.ContentType) res = append(res, r.Duration.String()) res = append(res, r.ResultFile) + res = append(res, ffufhash) return res }