这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions pkg/output/file_html.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ type htmlResult struct {
ResultFile string
Url string
Host string
HTMLColor string
FfufHash string
}

type htmlFileOutput struct {
Expand Down Expand Up @@ -82,12 +84,11 @@ const (
<table id="ffufreport">
<thead>
<div style="display:none">
|result_raw|StatusCode|Input|Position|ContentLength|ContentWords|ContentLines|ContentType|Duration|Resultfile|ScraperData|
|result_raw|StatusCode{{ range $keyword := .Keys }}|{{ $keyword | printf "%s" }}{{ end }}|Url|RedirectLocation|Position|ContentLength|ContentWords|ContentLines|ContentType|Duration|Resultfile|ScraperData|FfufHash|
</div>
<tr>
<th>Status</th>
{{ range .Keys }} <th>{{ . }}</th>
{{ end }}
{{ range .Keys }} <th>{{ . }}</th>{{ end }}
<th>URL</th>
<th>Redirect location</th>
<th>Position</th>
Expand All @@ -98,13 +99,14 @@ const (
<th>Duration</th>
<th>Resultfile</th>
<th>Scraper data</th>
<th>Ffuf Hash</th>
</tr>
</thead>

<tbody>
{{range $result := .Results}}
<div style="display:none">
|result_raw|{{ $result.StatusCode }}{{ range $keyword, $value := $result.Input }}|{{ $value | printf "%s" }}{{ end }}|{{ $result.Url }}|{{ $result.RedirectLocation }}|{{ $result.Position }}|{{ $result.ContentLength }}|{{ $result.ContentWords }}|{{ $result.ContentLines }}|{{ $result.ContentType }}|
|result_raw|{{ $result.StatusCode }}{{ range $keyword, $value := $result.Input }}|{{ $value | printf "%s" }}{{ end }}|{{ $result.Url }}|{{ $result.RedirectLocation }}|{{ $result.Position }}|{{ $result.ContentLength }}|{{ $result.ContentWords }}|{{ $result.ContentLines }}|{{ $result.ContentType }}|{{ $result.Duration }}|{{ $result.ResultFile }}|{{ $result.ScraperData }}|{{ $result.FfufHash }}|
</div>
<tr class="result-{{ $result.StatusCode }}" style="background-color: {{$result.HTMLColor}};">
<td><font color="black" class="status-code">{{ $result.StatusCode }}</font></td>
Expand All @@ -120,7 +122,8 @@ const (
<td>{{ $result.ContentType }}</td>
<td>{{ $result.Duration }}</td>
<td>{{ $result.ResultFile }}</td>
<td>{{ $result.ScraperData }}
<td>{{ $result.ScraperData }}</td>
<td>{{ $result.FfufHash }}</td>
</tr>
{{ end }}
</tbody>
Expand Down Expand Up @@ -209,9 +212,14 @@ func writeHTML(filename string, config *ffuf.Config, results []ffuf.Result) erro
htmlResults := make([]htmlResult, 0)

for _, r := range results {
ffufhash := ""
strinput := make(map[string]string)
for k, v := range r.Input {
strinput[k] = string(v)
if k == "FFUFHASH" {
ffufhash = string(v)
} else {
strinput[k] = string(v)
}
}
strscraper := ""
for k, v := range r.ScraperData {
Expand Down Expand Up @@ -242,6 +250,8 @@ func writeHTML(filename string, config *ffuf.Config, results []ffuf.Result) erro
ResultFile: r.ResultFile,
Url: r.Url,
Host: r.Host,
HTMLColor: r.HTMLColor,
FfufHash: ffufhash,
}
htmlResults = append(htmlResults, hres)
}
Expand Down