百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

http-sniffer

> 编程语言
开源

一个多线程工具,用于从 PCAP 文件中捕获 TCP 流量统计信息和嵌入的 HTTP 头。每个携带 HTTP 的 TCP 流量都会以 JSON 格式导出到文本文件中。

193 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个多线程工具,用于从 PCAP 文件中捕获 TCP 流量统计信息和嵌入的 HTTP 头。每个携带 HTTP 的 TCP 流量都会以 JSON 格式导出到文本文件中。

http-sniffer

A multi-threading tool to sniff HTTP header records beyond TCP flow statistics.

MIT licensed.

Features

  • Live network interface and offline PCAP file capture
  • Multi-threading for high-performance traffic analysis
  • TCP flow statistics export
  • HTTP request/response pair extraction
  • JSON and CSV output formats

Quick Start

bash
# Install dependencies
sudo apt-get install cmake libpcap-dev libjson-c-dev build-essential  # Ubuntu/Debian
brew install cmake libpcap json-c  # macOS

# Build and run
make
./bin/http-sniffer -i 

Build

bash
make                # Standard build
make debug          # Debug build
make nfm            # With NFM support
make clean-build    # Clean then build
make test           # Run unit tests
make test-debug     # Build debug and run tests

Usage

bash
# Live capture
./bin/http-sniffer -i en0

# PCAP file analysis
./bin/http-sniffer -r capture.pcap

# Save to JSON
./bin/http-sniffer -i en0 -o output.json

Output

CSV Format

csv
[20120921 16:40:09]10.187.179.28:53196-->180.149.134.229:80 1335164797.208360 0.0 0.0 167 5/3 0/0 0 0

JSON Format

…

Dependencies

  • libpcap - Packet capture
  • json-c - JSON parsing
  • CMake - Build system
  • Google Test - Unit testing (optional)

Note: If you encounter json-c unused params errors on Linux, try the alternative version.

Author

Xiaming Chen
SJTU, Shanghai, China 2012-04-01

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言