A set of Python scripts to manipulate PCAPNG files
Project description
PCAPNG to HAR Converter
Python-based tool for converting PCAPNG files to HAR files.
License: GPLv3 and MIT
Overview
This project is a Python-based tool for converting PCAPNG files to HAR files. It supports both HTTP/1.1 and HTTP/2 protocols.
Requirements
- Python 3.11+
tshark
(part of the Wireshark suite; requires version >= 4.0)
Installation
- Install Python 3.11 or higher.
- Install
tshark
from the Wireshark suite. - Clone this repository:
git clone <repository_url>
cd <repository_directory>
- Install the required Python packages:
pip install -r requirements.txt
Usage
Prior to using this converter, please have a look at documentation on how to convert .pcap to .pcapng
Shell
Run ./pcapng_to_har.py [-h]
in your shell (with your Python virtual environment activated)
Python
from pcapng_to_har import pcapng_to_har, Tshark
def pcapng_to_har(
input_file: Path | str,
output_file: Path | str | None = None,
*,
tshark: Tshark | None = None,
socket_operations_file: Path | str | None = None,
cryptography_operations_file: Path | str | None = None,
overwrite: bool = False,
**json_dump_kws: Any,
) -> None:
Licensing
This work is licensed under multiple licences:
- All the code in this repository is licensed under the GPLv3 license.
- Copyright: 2024 U+039b hello@pts-project.org
- Copyright: 2024 Defensive Lab Agency contact@defensive-lab.agency
- The files containing a SPDX header are licensed under the MIT license.
- Copyright: 2024 Pôle d'Expertise de la Régulation Numérique - PEReN contact@peren.gouv.fr
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
pcapng_utils-1.0.1.tar.gz
(32.1 kB
view hashes)
Built Distribution
Close
Hashes for pcapng_utils-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc725c62236ef7e9b48f2d0b4c3c36b41b30dc77c58bf46b5bd73f8b2e4575c |
|
MD5 | 40980c21c5c49329ae49e68a10cae0e8 |
|
BLAKE2b-256 | 5afc856040091fc4540bad273ae81b6765e162c1a85a5d9b5d75ecf25ed2bf11 |