Skip to main content

PlotCap

PlotCap - a simple network visualization tool.

Sample

Introduction

PlotCap is a simple command line tool written in Python and based on PyVis, that parses network capture files (produced by tools such as tcpdump or Wireshark) to render a graph of the network topology in a web page.

PlotCap was designed for red team engagements, with the aim of quickly mapping out relationships between devices (“nodes”) in a network. Target groups are: network administrators, penetration testers and curious people.

Visualization can be performed at layer 2 (MAC addresses) and layer 3 (IP addresses). Layer 2 is the default. The tool attempts to resolve MAC addresses unless directed otherwise.

Install

You can install plotcap on your system by using pipx:

pipx install git+https://github.com/darknetehf/plotcap.git

And optionally:

pipx ensurepath

This will add ‘~/.local/bin’ to your PATH environment variable.

Usage

plotcap  -f capture.cap

This is equivalent to:

plotcap  -f capture.cap --layer2

or:

plotcap  -f capture.cap --layer2 --resolve-oui

Do not resolve MAC addresses:

plotcap  -f capture.cap --layer2 --no-resolve-oui

Show IP addresses:

plotcap  -f capture.cap --layer3

To increase verbosity add -v or -vv for debugging.

API

A convenience API is available if you just want to parse the .pcap file and reuse the results, but don’t want a graphical representation.

from plotcap.api import parse_file

pcap_file = "/tmp/test.pcap"
conversations = parse_file(pcap_file=pcap_file, layer=2)
for conversation, packet_count in conversations.items():
   print(f"src: {conversation.src} - dst: {conversation.dst} - packets: {packet_count}")

Limitations

  • Although this is a command line tool, it requires a graphical environment and a web browser to render network maps. On headless systems we suggest using Xvfb to set up virtual sessions.

  • PlotCap was tested on Linux only

  • MAC addresses may not always be resolved to manufacturer names, especially if address randomization comes into play

  • See the TODO file for more missing features

Metadata

Release files for plotcap 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plotcap 1.3.1
File Size Uploaded
plotcap-1.3.1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plotcap 1.3.1
File Interpreter ABI Platform
plotcap-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.4 kB

Release files / plotcap-1.3.1.tar.gz

Download URL plotcap-1.3.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
adb364a1516c9171c85be39e1d53f57c0078e436e69111b6e86d3f74761cffe2
BLAKE2b-256 checksum
How to use checksums
9d77921797c0f22a23784962ed839b1ebd1bd432aece1f1e8a93587aac8849f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2025.

Transparency log

Release files / plotcap-1.3.1-py3-none-any.whl

Download URL plotcap-1.3.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0323c488c16def8e3371984f8e1f433c1695cf85106d25df7ec9af8b7e9c7732
BLAKE2b-256 checksum
How to use checksums
6cf5fcb5cc86ef01a61c6ffd8a4aaa26be8824d8e8cd7603f7707d412c8fbf70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page