mon2pcap


Namemon2pcap JSON
Version 1.0.7 PyPI version JSON
download
home_pagehttps://github.com/arussu/mon2pcap
SummaryConvert StarOS "monitor subscriber" or "monitor protocol" ASCII dump to PCAP
upload_time2023-11-03 09:54:22
maintainer
docs_urlNone
authorArtur Russu
requires_python>=3.8.1,<4.0.0
licenseGPL-3.0-only
keywords scapy mon2pcap
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
- [Python 3.8.1 or newer](https://www.python.org/downloads/)  
  ⚠️ Installers usually ask to add Python to `PATH`, do it now and you will avoid headaches later. 
- [pip - The Python Package Installer](https://pip.pypa.io/en/stable/installation/)
- _mon2pcap_ installation:
  ```
  $ pip install mon2pcap
  ```

## 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
 ```

## Implemented protocols
SPGW/GGSN/SAEGW:
 - `GTPC        (24)` ON  by default
 - `EGTPC       (74)` ON  by default
 - `Radius Auth (13)` ON  by default
 - `Radiu Acct  (14)` ON  by default
 - `EC Diameter (36)` ON  by default
 - `GTPU        (26)` OFF by default
 - `User L3     (19)` OFF by default
 - `CSS Data    (34)` OFF by default
 - `IPSec IKEv2 (40)` OFF by default
 - `DNS Client  (70)` OFF by default
 - `L2TP        (21)` ON  by default
 - `Radius COA  (31)` OFF by default 
 - `DHCP        (28)` OFF by default 
 - `L3 Tunnel   (33)` OFF by default //tested with GRE
 - `PFCP        (49)` ON  by default
 - `GTPP        (27)` ON  by default
 - `LMISF       (39)` OFF by default

---
MME/SGSN:
  - `GTPC       (24)` ON  by default
  - `S1AP       (81)` ON  by default
  - `DIAMETER   (36)` ON  by default
  - `RANAP      (56)` OFF by default
  - `BSSGP      (59)` OFF by default
  - `TCAP       (54)` OFF by default
  - `SCCP       (53)` OFF by default
  - `SLS        (94)` ON  by default
  - `SCTP       (51)` OFF by default

## Changelog
[CHANGELOG](CHANGELOG.md)

## License
[GPLv3](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/arussu/mon2pcap",
    "name": "mon2pcap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0.0",
    "maintainer_email": "",
    "keywords": "scapy,mon2pcap",
    "author": "Artur Russu",
    "author_email": "arussu@cisco.com",
    "download_url": "https://files.pythonhosted.org/packages/3a/51/93f5ed7efb58ad6f483ba95c7864bdd6dc705816090386dc07a03873b6d9/mon2pcap-1.0.7.tar.gz",
    "platform": null,
    "description": "# mon2pcap\n\n_mon2pcap_ is a program for converting Cisco's StarOS \"monitor subscriber\" or \"monitor protocol\" text based packet captures to PCAP.  \nThis program will work only if the PDU Hexdump switch (X or A) is enabled.\n\n## Disclaimer\nThis program comes with no guarantees whatsoever.  \nThe hexdump in the monsub does __NOT__ represent a full packet, hence:    \n\u26a0\ufe0f All data-link layer protocols are generated, the MACs there are bogus.  \n\u26a0\ufe0f All non-IP packets data-link, network and transport protocols are bogus.  \n\u26a0\ufe0f If it's IP packet, the ports are correct (most of the time) but the transport level protocol is bogus.  \nThe layers had to be generated for wireshark and other tools working with pcap file formats to properly dissect them.  \n\n## Installation\n### Prerequisites\n- [Python 3.8.1 or newer](https://www.python.org/downloads/)  \n  \u26a0\ufe0f Installers usually ask to add Python to `PATH`, do it now and you will avoid headaches later. \n- [pip - The Python Package Installer](https://pip.pypa.io/en/stable/installation/)\n- _mon2pcap_ installation:\n  ```\n  $ pip install mon2pcap\n  ```\n\n## Usage\n```\n$ mon2pcap --help\nusage: mon2pcap [-h] -i <infile> [-o <outfile>]\n                [-e {GTPC,GTPCv2,GTPU,RADIUS,USERL3,USERL3_IPV6,CSS,DIAMETER,RANAP...}]\n                [-s] [-v] [-d]\n\nConvert StarOS \"monitor subscriber\" or \"monitor protocol\" ASCII dump to PCAP\n\noptions:\n  -h, --help            show this help message and exit\n  -i <infile>, --input <infile>\n                        input file\n  -o <outfile>, --output <outfile>\n                        output file\n  -e {GTPC,GTPCv2,GTPU,RADIUS,USERL3,USERL3_IPV6,CSS,DIAMETER,RANAP...}\n                        exclude one or more protocols\n  -s, --skip-malformed  Skip malformed packets\n  -v, --version         show program's version number and exit\n  -d, --debug           debug level logging\n```\n\n```\n$  mon2pcap -i test_mon_sub.txt\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1746/1746 [00:00<00:00, 237876.14 lines/s]\nPCAP generated at \"test_mon_sub.pcap\"\n\nFound #14 valid packets\n========================\n GTPC         : 4\n DIAMETER     : 4\n PFCP         : 4\n GTPP         : 2\n Ignored      : 4\n ```\n\n## Implemented protocols\nSPGW/GGSN/SAEGW:\n - `GTPC        (24)` ON  by default\n - `EGTPC       (74)` ON  by default\n - `Radius Auth (13)` ON  by default\n - `Radiu Acct  (14)` ON  by default\n - `EC Diameter (36)` ON  by default\n - `GTPU        (26)` OFF by default\n - `User L3     (19)` OFF by default\n - `CSS Data    (34)` OFF by default\n - `IPSec IKEv2 (40)` OFF by default\n - `DNS Client  (70)` OFF by default\n - `L2TP        (21)` ON  by default\n - `Radius COA  (31)` OFF by default \n - `DHCP        (28)` OFF by default \n - `L3 Tunnel   (33)` OFF by default //tested with GRE\n - `PFCP        (49)` ON  by default\n - `GTPP        (27)` ON  by default\n - `LMISF       (39)` OFF by default\n\n---\nMME/SGSN:\n  - `GTPC       (24)` ON  by default\n  - `S1AP       (81)` ON  by default\n  - `DIAMETER   (36)` ON  by default\n  - `RANAP      (56)` OFF by default\n  - `BSSGP      (59)` OFF by default\n  - `TCAP       (54)` OFF by default\n  - `SCCP       (53)` OFF by default\n  - `SLS        (94)` ON  by default\n  - `SCTP       (51)` OFF by default\n\n## Changelog\n[CHANGELOG](CHANGELOG.md)\n\n## License\n[GPLv3](LICENSE)\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Convert StarOS \"monitor subscriber\" or \"monitor protocol\" ASCII dump to PCAP",
    "version": "1.0.7",
    "project_urls": {
        "Homepage": "https://github.com/arussu/mon2pcap",
        "Repository": "https://github.com/arussu/mon2pcap"
    },
    "split_keywords": [
        "scapy",
        "mon2pcap"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cee71ad7689be352d570646cffd3c1a58566b73ef9b92d9560023af3d5ceaf7e",
                "md5": "f5110410da0122804b2f858e8e15afbe",
                "sha256": "19624fe45f91574448e71cc4aee344e3b2795f6d89d4847207b4988d5478a222"
            },
            "downloads": -1,
            "filename": "mon2pcap-1.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5110410da0122804b2f858e8e15afbe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 28131,
            "upload_time": "2023-11-03T09:54:20",
            "upload_time_iso_8601": "2023-11-03T09:54:20.548877Z",
            "url": "https://files.pythonhosted.org/packages/ce/e7/1ad7689be352d570646cffd3c1a58566b73ef9b92d9560023af3d5ceaf7e/mon2pcap-1.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a5193f5ed7efb58ad6f483ba95c7864bdd6dc705816090386dc07a03873b6d9",
                "md5": "d872621df1a69187153aa764aeaca570",
                "sha256": "0cb58ebbb94c905ebe4f1a69729164bb3ba3f03e9d1e969fbf093559d46de412"
            },
            "downloads": -1,
            "filename": "mon2pcap-1.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "d872621df1a69187153aa764aeaca570",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 26977,
            "upload_time": "2023-11-03T09:54:22",
            "upload_time_iso_8601": "2023-11-03T09:54:22.219882Z",
            "url": "https://files.pythonhosted.org/packages/3a/51/93f5ed7efb58ad6f483ba95c7864bdd6dc705816090386dc07a03873b6d9/mon2pcap-1.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-03 09:54:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "arussu",
    "github_project": "mon2pcap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mon2pcap"
}
        
Elapsed time: 1.54027s