Skip to main content

pcap2map

Place IP's from PCAP on world map

This package enables a user to specify a network traffic file (i.e. a packet capture or .pcap file), extract the IP addresses from that file, geo-locate those addresses using a built-in database, and then place those IP's on a world map (a .png file).

Notes:

  • The geolocation is done via a database provided by IP2Location.com. The database is included as part of the package.
  • Only public IP's are extracted
  • Typical runtime is 10 seconds for a small .pcap file
  • There are many pre-existing packages that geo-locate IP's but none that extract IP's from a .pcap. pcap2map solves the latter problem
  • pcap2map was written to be cross-platform
  • pcap2map was written with Python 3.7

Dependencies:

  • Wireshark - pyshark, a Python packet parsing module, relies on Wireshark. Wireshark download instructions can be found here
  • orca - The visualization and mapping of the geo-located IP addresses relies on plotly, to include a package called orca. Orca ownload instructions can be found here

Installation instructions

via github:

git clone https://github.com/jspeed-meyers/pcap2map
pip install -r requirements.txt

via PYPI (still under construction):

pip install pcap2map

Note on Docker: Not currently available. The current Dockerfile file does not work.

Usage instructions

after dowloading from github:

cd pcap2map\src\pcap2map
pcap2map.py [filepath\filename]

# Additionally, you can build and install the package
cd pcap2map
python setup.py sdist bdist_wheel
python setup.py install
python -m pcap2map -h  # for help
python -m pcap2map [filename]

after downloading from pip (still under construction):

python -m pcap2map -h  # for help
python -m pcap2map [filename]

Run tests

after downloading from github:

cd pcap2map\src\pcap2map
pytest

Release files for pcap2map 0.0.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 pcap2map 0.0.1
File Size Uploaded
pcap2map-0.0.1.tar.gz 16.6 MB Details

Built distribution (wheel)

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

Total release size: 33.6 MB

Release files / pcap2map-0.0.1.tar.gz

Download URL pcap2map-0.0.1.tar.gz
Size 16.6 MB
Tags Source
SHA-256 checksum
How to use checksums
442410a9ad96967137be2b285bead475ca52f89907d2955cfa7f372f5ecf4f68
BLAKE2b-256 checksum
How to use checksums
e66c8c7e9ce92bc999ec678fe01755191709a4ee96227dc437b08a39bc8ecec6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6

Release files / pcap2map-0.0.1-py3-none-any.whl

Download URL pcap2map-0.0.1-py3-none-any.whl
Size 16.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
db00568890fe82dfd7343c00920930c172610d6e281957ed7cdd5b0c6f95811a
BLAKE2b-256 checksum
How to use checksums
5c7c9d8179b4aa8859fbf99513e62971e717847867921f72179ca3f816b5f0e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.0.1 This release

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