Skip to content

读取TCP流判断有误 #20

@9mlcy7

Description

@9mlcy7

在 simplenet.go 中 tcpSend 这个函数里,conn.Read 读取数据时用了:
if length < len(tmp) { break }
但这会导致 TCP 流数据被提前截断。因为 TCP 没有“包边界”,一次 Read 返回的长度并不代表服务端是否发完,只是内核缓冲区里有多少数据而已;这就导致了拿到的数据不完整

另外需要注意的是 type-nmap.go 中 getResponse 函数会传递 size 去刻意截断数据

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions