Skip to main content

Convert StarOS "monitor subscriber" or "monitor protocol" ASCII dump to PCAP

Project description

mon2pcap

mon2pcap is a program for converting Cisco's StarOS "monitor subscriber" or "monitor protocol" text based packet captures to PCAP.
This program will work only if the PDU Hexdump switch (X or A) is enabled.

Disclaimer

This program comes with no guarantees whatsoever.
The hexdump in the monsub does NOT represent a full packet, hence:
⚠️ All data-link layer protocols are generated, the MACs there are bogus.
⚠️ All non-IP packets data-link, network and transport protocols are bogus.
⚠️ If it's IP packet, the ports are correct (most of the time) but the transport level protocol is bogus.
The layers had to be generated for wireshark and other tools working with pcap file formats to properly dissect them.

Installation

Prerequisites

Usage

$ mon2pcap --help
usage: mon2pcap [-h] -i <infile> [-o <outfile>]
                [-e {GTPC,GTPCv2,GTPU,RADIUS,USERL3,USERL3_IPV6,CSS,DIAMETER,RANAP...}]
                [-s] [-v] [-d]

Convert StarOS "monitor subscriber" or "monitor protocol" ASCII dump to PCAP

options:
  -h, --help            show this help message and exit
  -i <infile>, --input <infile>
                        input file
  -o <outfile>, --output <outfile>
                        output file
  -e {GTPC,GTPCv2,GTPU,RADIUS,USERL3,USERL3_IPV6,CSS,DIAMETER,RANAP...}
                        exclude one or more protocols
  -s, --skip-malformed  Skip malformed packets
  -v, --version         show program's version number and exit
  -d, --debug           debug level logging
$  mon2pcap -i test_mon_sub.txt
100%|██████████████████████████████████████████████████████| 1746/1746 [00:00<00:00, 237876.14 lines/s]
PCAP generated at "test_mon_sub.pcap"

Found #14 valid packets
========================
 GTPC         : 4
 DIAMETER     : 4
 PFCP         : 4
 GTPP         : 2
 Ignored      : 4

License

GPLv3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mon2pcap-1.0.4.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

mon2pcap-1.0.4-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file mon2pcap-1.0.4.tar.gz.

File metadata

  • Download URL: mon2pcap-1.0.4.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.5.0

File hashes

Hashes for mon2pcap-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d116e5204d648fbd1ab4dcbe95862970e86d0d3c0c5eb6d6b0bdf74c950659b0
MD5 1fae2d1207b9ef51076b1c48615d5f4c
BLAKE2b-256 ecf63b7c40783e10f6b2c90a89866a964e79a716e34294df2463227a7c1faea6

See more details on using hashes here.

Provenance

File details

Details for the file mon2pcap-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: mon2pcap-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.5.0

File hashes

Hashes for mon2pcap-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 71cda447479a741ebbd4c6be340ab1eca9aaef3a0f6e20ef8922ab2f573dd0a8
MD5 108051ae92b947795bd7b6825046950f
BLAKE2b-256 0aa1989cc539ae63a9fabe8344efb53e9c6486929f8523964561a6edd0effb73

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page