nuclei
nuclei copied to clipboard
通过SDK 如何获得not found的output.ResultEvent
通过sdk ExecuteWithCallback函数只能获取result(only if results are found),found && not found 的 result 我都想要,有没有方法可以实现?
Hi @zhoujubhong ! Thanks for your request. We'll take a look into this - just dropping a translation here for reference:
'Through the sdk ExecuteWithCallback function, I can only get the result (only if results are found), and I want the results of found && not found. Is there any way to achieve this?'
@GeorginaReeder When executing a scanning task using the SDK's ExecuteWithCallback function, only events can be obtained (only when results are found). However, I want to capture both results and when no results are found, analyzing the information of requests and responses within the task.
Try with WithMatcherStatus(true)
@Mzack9999 thank you!
@Mzack9999 Hi,This method does not solve the problem, I expect to get the debug message of each POC and read it through the io.WriteCloser.
func(){ writer, err := output.NewWriter(
output.WithMatcherStatus(true),
output.WithJson(true, true),
)
if err != nil {
panic(err)
}
var ne *nuclei.NucleiEngine
ne, err = nuclei.NewNucleiEngine(
nuclei.UseOutputWriter(writer),
)}
type NucleiEngine struct {
// user options
resultCallbacks []func(event *output.ResultEvent)
onFailureCallback func(event *output.InternalEvent)
disableTemplatesAutoUpgrade bool
enableStats bool
onUpdateAvailableCallback func(newVersion string)
……
}
I want to get "onFailureCallback func(event *output.InternalEvent)"