projectdiscovery / naabu

A fast port scanner written in go with a focus on reliability and simplicity. Designed to be used in combination with other tools for attack surface discovery in bug bounties and pentests
https://projectdiscovery.io
MIT License
4.51k stars 531 forks source link

An error occurred during runtime #1122

Open jiaocoll opened 1 month ago

jiaocoll commented 1 month ago

panic: runtime error: invalid memory address or nil pointer dereference [worker 1 ] [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xe25485] [worker 1 ] [worker 1 ] goroutine 45 [running]: [worker 1 ] github.com/projectdiscovery/naabu/v2/pkg/scan.(*Scanner).TCPResultWorker(0xc00a503e60, {0x1bf9eb0, 0xc002d539f0}) [worker 1 ] /home/ameng/桌面/naabu-v2.3.1/v2/pkg/scan/scan.go:282 +0x6c5 [worker 1 ] created by github.com/projectdiscovery/naabu/v2/pkg/scan.(*Scanner).StartWorkers in goroutine 36 [worker 1 ] /home/ameng/桌面/naabu-v2.3.1/v2/pkg/scan/scan.go:194 +0xd1

code: image

If an error occurs here, should we first determine whether this variable is nil and determine the content of the variable