Conversation
added 2 commits
December 9, 2024 18:09
修复了潜在的无限循环问题,现在只读取有限次数的数据包 改进了 ICMP 消息构造,使用正确的 icmp.Echo 结构体 添加了对 ICMP 回复消息的验证,确保只在收到 ICMP Echo Reply 时返回 true 增强了错误处理和日志记录 2. 改进了 IP 扫描功能 (check_ip.go) 添加了并发控制,限制同时进行的 ping 操作数量,防止系统资源耗尽 改进了错误处理,当解析子网失败时会报告错误而不是静默忽略 优化了输出格式,当没有 IP 地址可显示时会显示"(无)" 添加了详细的函数文档注释 3. 完善了子网解析功能 (parse_subnet.go) 改进了网络地址和广播地址的处理逻辑 添加了详细的函数文档注释 优化了排除规则匹配逻辑 4. 增强了程序入口点 (main.go) 改进了帮助信息的显示,添加了使用示例 增加了更清晰的错误处理和退出码 5. 完善了数据结构定义 (common.go) 为 HostInfo 结构体添加了详细注释 6. 实现了 ICMP 监听功能 (listen_icmp.go) 为之前空缺的文件添加了完整的 ICMP 监听实现
Member
|
浪神已经萎了,就由我来合吧 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
针对#16优化