Skip to content

针对#16优化 #22

New issue

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

KnightBlood
Copy link

针对#16优化

DESKTOP-OB8V0P7\Administrator 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 监听实现
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant