httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Add ResultCallback in runner.Options

Open 0xdu opened this issue 3 years ago • 1 comments

Describe the use case of this feature:

This is very useful when integrating nuclei with other tools to get results

For example:

type Options struct {
	//other options
    .........
    ResultCallback func(result Result)
}

When an HTTP result is discovered, this option will be called in analyzer function https://github.com/projectdiscovery/httpx/blob/f2cd5b835348c5563c4c018dc2ed414d82ccf249/runner/runner.go#L1494

result := Result{
     ......
}
if (r.options.ResultCallback != nil) {
       r.options.ResultCallback(result)
}

0xdu avatar Aug 18 '22 02:08 0xdu

~~On Hold - Depends on https://github.com/projectdiscovery/nuclei/issues/2253~~ (implemented differently in nuclei)

Mzack9999 avatar Aug 29 '22 13:08 Mzack9999

Already implemented in https://github.com/projectdiscovery/httpx/pull/825 - cc @ehsandeep

Mzack9999 avatar Nov 05 '22 14:11 Mzack9999