Skip to content
Open
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ cmd/functional-test/*.cfg
.devcontainer
/httpx
/dist
/resume.cfg
resume.cfg
vendor/
1 change: 1 addition & 0 deletions runner/resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ type ResumeCfg struct {
Index int
current string
currentIndex int
lastPrinted string
}
8 changes: 7 additions & 1 deletion runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,12 @@ func (r *Runner) RunEnumeration() {
gologger.Silent().Msgf("%s\n", resp.str)
}

// Update resume state after output to avoid skipping unprocessed targets on interrupt
if r.options.resumeCfg != nil {
r.options.resumeCfg.lastPrinted = resp.Input

}

// store responses or chain in directory
if resp.Err == nil {
URL, _ := urlutil.Parse(resp.URL)
Expand Down Expand Up @@ -2582,7 +2588,7 @@ func extractPotentialFavIconsURLs(resp []byte) (candidates []string, baseHref st
func (r *Runner) SaveResumeConfig() error {
var resumeCfg ResumeCfg
resumeCfg.Index = r.options.resumeCfg.currentIndex
resumeCfg.ResumeFrom = r.options.resumeCfg.current
resumeCfg.ResumeFrom = r.options.resumeCfg.lastPrinted
return goconfig.Save(resumeCfg, DefaultResumeFile)
}

Expand Down