We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
逻辑问题,导致UDP端口无法扫描 type-nmap.go
type-nmap.go
func (n *Nmap) Scan(ip string, port int) (status Status, response *Response) { var probeNames ProbeList if n.bypassAllProbePort.exist(port) == true { probeNames = append(n.portProbeMap[port], n.allProbeMap...) } else { probeNames = append(n.allProbeMap, n.portProbeMap[port]...) } probeNames = append(probeNames, n.sslProbeMap...) //探针去重 probeNames = probeNames.removeDuplicate() firstProbe := probeNames[0] status, response = n.getRealResponse(ip, port, n.timeout, firstProbe) //如果目标为UDP端口这里就直接退出函数了 if status == Closed || status == Matched { return status, response } otherProbes := probeNames[1:] return n.getRealResponse(ip, port, 2*time.Second, otherProbes...) }
如果目标端口为UDP端口,该函数首次使用TCP协议连接会返回closed,导致无法准确识别端口
在func (n *Nmap) getResponseByProbes(host string, port int, timeout time.Duration, probes ...string) (status Status, response *Response) 函数中也有相似问题,目标端口如果是TCP端口,但是做循环的时候如果遇到requestName为UDP_*这类的规则,也会由于TCP端口无法使用UDP协议连接导致判断为close退出函数。
func (n *Nmap) getResponseByProbes(host string, port int, timeout time.Duration, probes ...string) (status Status, response *Response)
UDP_*
可不可以TCP和UDP分开扫
The text was updated successfully, but these errors were encountered:
确实有这个问题。。。。。。
架构设计的时候设计的不合理
暂时还没想好怎么改
Sorry, something went wrong.
No branches or pull requests
逻辑问题,导致UDP端口无法扫描
type-nmap.go
如果目标端口为UDP端口,该函数首次使用TCP协议连接会返回closed,导致无法准确识别端口
在
func (n *Nmap) getResponseByProbes(host string, port int, timeout time.Duration, probes ...string) (status Status, response *Response)
函数中也有相似问题,目标端口如果是TCP端口,但是做循环的时候如果遇到requestName为UDP_*
这类的规则,也会由于TCP端口无法使用UDP协议连接导致判断为close退出函数。可不可以TCP和UDP分开扫
The text was updated successfully, but these errors were encountered: