Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
PcapViz — 基于pcap文件可视化网络拓扑并收集图统计信息。 | Kitploit
工具/GitHubGitHub/1ultimat3/pcapviz
数据包嗅探与分析网络映射网络取证信息收集
GitHub1ultimat3/pcapviz

PcapViz

基于pcap文件可视化网络拓扑并收集图统计信息。

查看仓库
359643年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

PcapViz

PcapViz 利用从网络设备(使用 tcpcap 或其他抓包软件)捕获的 pcap 文件中的包信息,将网络绘制为设备拓扑和信息流图。它过滤并可选地在以下 3 个“层”中的任意一层显示捕获的数据包:

  • 设备级流量拓扑,
  • IP 通信,
  • TCP/UDP 通信。

每层都能从同一组网络数据包生成不同的网络图。这种分离使得更清晰地看到每一层的数据流,而不是像许多其他可视化包那样混合在一起。应该更容易确定关键拓扑节点或发现数据外泄尝试的模式。

特性

  • 网络拓扑图 - 2 = 设备;会话信息流图:3 = IP,4 = TCP/UDP
  • 通信图节点标签显示国家信息和连接统计信息
  • 列出最常被联系和最常发送数据的机器
  • 节点标签包含主机域名(如果可通过反向 DNS 查找获取)
  • 命令行选择 Graphviz 图形布局引擎,如 dot 或 sfdp

用法

root@kitploit:~
usage: main.py [-h] [-i [PCAPS [PCAPS ...]]] [-o OUT] [-g GRAPHVIZ] [--layer2]
               [--layer3] [--layer4] [-fi] [-fo] [-G GEOPATH] [-l GEOLANG]
               [-E LAYOUTENGINE] [-s SHAPE]

pcap topology and message mapper

optional arguments:
  -h, --help            show this help message and exit
  -i [PCAPS [PCAPS ...]], --pcaps [PCAPS [PCAPS ...]]
                        space delimited list of capture files to be analyzed
  -o OUT, --out OUT     topology will be stored in the specified file
  -g GRAPHVIZ, --graphviz GRAPHVIZ
                        graph will be exported to the specified file (dot
                        format)
  --layer2              device topology network graph
  --layer3              ip message graph. Default
  --layer4              tcp/udp message graph
  -fi, --frequent-in    print frequently contacted nodes to stdout
  -fo, --frequent-out   print frequent source nodes to stdout
  -G GEOPATH, --geopath GEOPATH
                        path to maxmind geodb data
  -l GEOLANG, --geolang GEOLANG
                        Language to use for geoIP names
  -E LAYOUTENGINE, --layoutengine LAYOUTENGINE
                        Graph layout method - dot, sfdp etc.
  -s SHAPE, --shape SHAPE
                        Graphviz node shape - circle, diamond, box etc.

运行 tests/core.py 处理 test.pcap 文件的示例

绘制通信图(第2层),片段

root@kitploit:~
python main.py -i tests/test.pcap -o test2.png --layer2

第2层示例

第3层,使用默认 sfdp 布局

第3层示例

第4层,使用默认 sfdp 布局

第4层示例

返回收到数据包数量最多的主机:

root@kitploit:~
python3 main.py -i tests/test.pcap -fi --layer3
4 172.16.11.12
1 74.125.19.17
1 216.34.181.45 slashdot.org
1 172.16.11.1
1 96.17.211.172 a96-17-211-172.deploy.static.akamaitechnologies.com

安装

必要依赖:

  • GraphViz 请参阅下方的系统说明

  • Pip 包要求 运行以下命令后,将安装 Maxmind Python API 和其他依赖项:

    root@kitploit:~
    pip3 install -r requirements.txt
    

    所以,当然,请务必运行它!你正在使用 Python 虚拟环境,对吧?

    root@kitploit:~

Debian 安装

对于基于 Debian 的发行版,你需要安装 GraphViz 及一些额外依赖:

root@kitploit:~
apt-get install python3-dev
apt-get install graphviz libgraphviz-dev pkg-config

OSX 安装

Scapy 在 OSX 上无法开箱即用。请遵循 scapy 网站 中针对特定平台的说明

root@kitploit:~
brew install graphviz
brew install --with-python libdnet
brew install https://raw.githubusercontent.com/secdev/scapy/master/.travis/pylibpcap.rb

测试

单元测试可以从 tests 目录运行:

root@kitploit:~
python3 core.py

上面的示例输出图即为测试输出图。

注意:目前有两条关于 graphviz 中已被弃用功能的警告;并且为了使测试正常运行,你可能需要调整 fake args 以指向你的 geoIP 数据文件副本。 如果没有 geoIP 数据的访问权限,其中两个测试将始终失败。

下载工具