macOS
brew install ngreplocal Homebrew formula metadata
sudo port install ngrepMacPorts ports tree · net/ngrep/Portfile · 来源: api.github.com
安装
brew install ngreplocal Homebrew formula metadata
sudo port install ngrepMacPorts ports tree · net/ngrep/Portfile · 来源: api.github.com
sudo apk add ngrepAlpine Linux edge package indexes · ngrep · 来源: dl-cdn.alpinelinux.org
sudo dnf install ngrepFedora Rawhide package metadata · ngrep · 来源: dl.fedoraproject.org
nix profile install nixpkgs#ngrepnixpkgs package indexes · pkgs/by-name/ng/ngrep/package.nix · 来源: api.github.com
sudo pacman -S ngrepArch Linux sync databases · ngrep · 来源: geo.mirror.pkgbuild.com
sudo zypper install ngrepopenSUSE Tumbleweed package metadata · ngrep · 来源: download.opensuse.org
概览
Network grep
历史
ngrep is "network grep": a pcap-based command-line packet analyzer that applies regular-expression or hexadecimal matching to packet payloads while also accepting BPF filters like tcpdump. It is built for quick inspection of plaintext traffic and saved capture files.
ngrep was written by Jordan Ritter and dates back to the early 2000s; a freshmeat announcement for ngrep 1.39.1 appeared on April 23, 2001. The tool's identity has stayed stable: bring GNU grep-style matching to the network layer.
The project lived for years as a classic Unix network utility and later moved active issue and patch handling to GitHub. Its README still frames ngrep as a PCAP tool that understands IPv4/IPv6, TCP, UDP, ICMP, IGMP, raw packets, several link-layer interface types, and BPF filter logic.
ngrep became a small but widely packaged troubleshooting utility because it sits between tcpdump and a full packet analyzer. It was included de facto in many popular distributions over decades, and the maintainer explicitly asks distribution package maintainers to forward bugs and patches so upstream can track downstream fixes.
Its adoption is bounded by encryption. ngrep is excellent for DNS, old HTTP, SMTP, SIP, IMAP, test traffic, malware beacons in plaintext, and pcap triage; it is less useful when payloads are TLS-encrypted unless the useful signal is in headers, metadata, or local decrypted test traffic.
A typical workflow is `sudo ngrep -d any -W byline 'Host:|User-Agent:' tcp port 80`, or using an empty match expression with a BPF filter to print payloads for a protocol. It can read and write pcap dump files, making it useful for quick command-line passes before opening Wireshark.
Package nerds install it because it is the fast, memorable answer to "show me packets containing this string". It is especially handy on servers where a GUI analyzer is unavailable and tcpdump output is too raw for the immediate question.
ngrep is a survivor from the era when small C network tools solved one sharp problem well. It matters less as a dependency and more as an operator tool: a tiny package that can save a debugging session when traffic is still human-readable.
安全态势
broad file, network, media, or database tool signal.
blue 风险 · 中 置信度 · tool
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
ngrep | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:ngrep |
|---|---|
| 版本 | 1.49.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/ngrep |
| 主页 | https://github.com/jpr5/ngrep |
| 仓库 | https://github.com/jpr5/ngrep |
| 上游文档 | https://github.com/jpr5/ngrep#readme |
| 许可证 | ngrep |
| 源码归档 | https://github.com/jpr5/ngrep/archive/refs/tags/v1.49.0.tar.gz |
| 最后更新 | 2026-06-25T13:37:57+02:00 |
| Pulse | updated |
| 依赖 | libpcap, pcre2 |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | ngrep |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
ngrep 1.47+ds1-6
grep for network traffic
sudo apt install ngrepngrep
nix profile install nixpkgs#ngrepngrep 1.47+ds1-5build2
grep for network traffic
sudo apt install ngrepngrep 1.49.0-r0
A grep-like utility that allows you to search for network packets on an interface
https://ngrep.sourceforge.net/
sudo apk add ngrepngrep-dbg 1.49.0-r0
A grep-like utility that allows you to search for network packets on an interface (debug symbols)
https://ngrep.sourceforge.net/
sudo apk add ngrep-dbgngrep-doc 1.49.0-r0
A grep-like utility that allows you to search for network packets on an interface (documentation)
https://ngrep.sourceforge.net/
sudo apk add ngrep-docngrep 1.47^20241209gitb2e3ba3-4.fc44
Network layer grep tool
sudo dnf install ngrepngrep 1.49.0-1
A grep-like utility that allows you to search for network packets on an interface.
https://github.com/jpr5/ngrep/
sudo pacman -S ngrepngrep 1.49.0-1.3
Network grep
sudo zypper install ngrepngrep
sudo port install ngrep来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.