网络数据包分析器 CLI
使用 C 和 libpcap 构建命令行网络数据包分析器,支持协议分析、流量统计、数据导出、威胁告警、连接追踪和 IP 地理定位。
提示词正文
复制后可直接粘贴到模型或内部评测工具。
Create a command-line network packet analyzer in C using libpcap. Implement packet capture from network interfaces with filtering options. Add protocol analysis for common protocols (TCP, UDP, HTTP, DNS, etc.). Include traffic statistics with bandwidth usage and connection counts. Implement packet decoding with detailed header information. Add export functionality in PCAP and CSV formats. Include alert system for suspicious traffic patterns. Implement connection tracking with state information. Add geolocation lookup for IP addresses. Include command-line arguments for all options with sensible defaults. Implement color-coded output for better readability.
使用场景
参考输出
命令行界面显示实时捕获的数据包摘要,包含源/目标 IP、端口、协议、长度和标志位;随后输出流量统计报表(带宽、连接数)以及可疑流量告警列表。
评分维度
能正确捕获接口数据包;支持过滤表达式;正确解析 TCP/UDP/HTTP/DNS 头部;有效计算统计指标;PCAP/CSV 导出无误;告警逻辑准确;地理定位功能正常;命令行参数可用;输出可读性好。
试用与模板
填写变量后复制,或保存到个人工作台模板。
这个模板没有变量,可直接复制使用。
用户评分
0 个评分你的评分
登录后评分
评论
0登录后评论