Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mobiwn/pcap2csv
๐ฆ Convert PCAP network capture files to CSV format for easy analysis and reporting! ๐
https://github.com/mobiwn/pcap2csv
csv cybersecurity cybersecurity-tool network-analysis network-traffic pcap pcap-converter pcap2csv scapy
Last synced: 3 months ago
JSON representation
๐ฆ Convert PCAP network capture files to CSV format for easy analysis and reporting! ๐
- Host: GitHub
- URL: https://github.com/mobiwn/pcap2csv
- Owner: Mobiwn
- License: mit
- Created: 2024-08-08T07:53:01.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-10T05:55:47.000Z (6 months ago)
- Last Synced: 2024-08-10T06:44:51.193Z (6 months ago)
- Topics: csv, cybersecurity, cybersecurity-tool, network-analysis, network-traffic, pcap, pcap-converter, pcap2csv, scapy
- Language: Python
- Homepage:
- Size: 211 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pcap2CSV
`Pcap2CSV` is a Python utility for converting packet capture (PCAP) files into CSV format. This tool allows for easy analysis of network traffic by converting detailed packet data into a structured CSV file, which can be used for further analysis or reporting. ๐
## Features
- ๐๏ธ Convert PCAP files to CSV format
- ๐ Support for IP, TCP, UDP, and other protocols
- ๐ฅ๏ธ Simple command-line interface
- ๐งช Includes utility scripts for generating test PCAP files
- โ Unit tests to ensure code reliability## Installation
1. **Clone the Repository** ๐
```bash
git clone https://github.com/mobiwn/Pcap2CSV.git
cd Pcap2CSV
```2. **Set Up a Virtual Environment** ๐๏ธ
```bash
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```3. **Install Dependencies** ๐ฆ
```bash
pip install -r requirements.txt
```## Usage
### Converting a PCAP File to CSV
To convert a PCAP file to CSV, use the `convert_pcap.py` script:
```bash
python scripts/convert_pcap.py
```**Example:**
```bash
python scripts/convert_pcap.py tests/data/test.pcap tests/data/test.csv
```### Generating a Test PCAP File
To generate a test PCAP file with random packets, use the `generate_test_pcap.py` script:
```bash
python scripts/generate_test_pcap.py
```This will generate a `test.pcap` file in the `tests/data/` directory.
## Project Structure
Here is the structure of the `Pcap2CSV` project as visible in GitHub:
```
Pcap2CSV/
โโโ .gitignore
โโโ LICENSE
โโโ README.md
โโโ requirements.txt
โโโ pcap2csv/
โ โโโ __init__.py
โ โโโ converter.py
โโโ scripts/
โ โโโ convert_pcap.py
โ โโโ generate_test_pcap.py
โโโ tests/
โโโ __init__.py
โโโ __pycache__/
โโโ data/
โโโ test_converter.py
```## Running Tests
To run the unit tests, use the following command:
```bash
python -m unittest discover -s tests
```## Contributing
Contributions are welcome! Please open an issue or submit a pull request to propose changes or improvements. ๐ค
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ๐
## Contact
For any questions or support, please contact [[email protected]]([email protected]). ๐ง