httpx
httpx copied to clipboard
Add ResultCallback in runner.Options
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)
}
~~On Hold - Depends on https://github.com/projectdiscovery/nuclei/issues/2253~~ (implemented differently in nuclei)
Already implemented in https://github.com/projectdiscovery/httpx/pull/825 - cc @ehsandeep