这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,13 @@ func main() {
if err != nil {
continue
}
printSearchResults(conf, pos, copt.Time, opts.General.Searchhash)
ok, reason := ffuf.HistoryReplayable(conf)
if ok {
printSearchResults(conf, pos, copt.Time, opts.General.Searchhash)
} else {
fmt.Printf("[ERR] Hash cannot be mapped back because %s\n", reason)
}

}
if err != nil {
fmt.Printf("[ERR] %s\n", err)
Expand Down
9 changes: 9 additions & 0 deletions pkg/ffuf/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ func SearchHash(hash string) ([]ConfigOptionsHistory, int, error) {
return coptions, int(position), err
}

func HistoryReplayable(conf *Config) (bool, string) {
for _, w := range conf.Wordlists {
if w == "-" || strings.HasPrefix(w, "-:") {
return false, "stdin input was used for one of the wordlists"
}
}
return true, ""
}

func configFromHistory(dirname string) (ConfigOptionsHistory, error) {
jsonOptions, err := os.ReadFile(filepath.Join(dirname, "options"))
if err != nil {
Expand Down