A small CLI security toolkit
Project description
GresecML
This command-line tool analyzes network traffic from either a .pcap file or a live capture, and makes predictions using a TensorFlow model. Results can be displayed in the console and/or written to an HTML/CSV file.
⚠️ Important
This tool was developed solely as part of an academic school project. It is intended for educational purposes only and should not be used in production environments or relied upon for professional applications.
Do not use this tool to scan network traffic unless you own it or have proper authorization.
Features
- Analyze
.pcapfiles or capture of live network traffic - Predict traffic sessions using a TensorFlow model
- Export results to an HTML report
- Filter sessions by probability thresholds
- Support for lazy loading to save memory
- Verbose mode for detailed console output
Workflow
The prediction pipeline follows these steps:
- Capture – Collects packets from a file or live network interface
- Sessions – Groups packets into sessions
- Prediction – Runs sessions through the TensorFlow model
- Output – Displays results in console and/or export to HTML
Installation
Install with pip:
pip install gresecml
Usage
Run the CLI with:
gresecml [OPTIONS] COMMAND [ARGS]...
For help:
gresecml --help
Examples with "gresecml tf predict":
-
Analyze a
.pcapfile with tensorflow and save results to HTMLgresecml tf predict -i traffic.pcap -o results.html
-
Run live capture on default interface for 60 seconds
gresecml tf predict
-
Run live capture on a specific interface with custom timeout
gresecml tf predict -if eth0 -t 120
-
Enable verbose output and full HTML report
gresecml tf predict -i traffic.pcap -o results.html -v -efo
-
Filter sessions with normal probability ≤ 70%
gresecml tf predict -i traffic.pcap -pnm 70
-
Use lazy loading to save memory
gresecml tf predict -i traffic.pcap -ll
Notes
- If no
--inputis provided, the tool defaults to live capture. - Lazy loading is recommended for large
.pcapfiles to reduce memory usage. - The HTML output provides a structured table of predictions for possible further investigation. The table is sorted by the prediction_normal column.
Example Output
When running with --verbose, predictions will be printed in the console.
If --output is specified, results will also be saved as an HTML file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gresecml-0.3.3.tar.gz.
File metadata
- Download URL: gresecml-0.3.3.tar.gz
- Upload date:
- Size: 550.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19c0efb5f0c629bb5f1472e249ed208a24d40be06c81eee888d5a64508bb76a8
|
|
| MD5 |
abeb1243b185e03f4305f3478f8fe7ba
|
|
| BLAKE2b-256 |
009d68b980526efdfedfe6d6add35a4a94db52851dcf51f079191dbe40a3a3a7
|
File details
Details for the file gresecml-0.3.3-py3-none-any.whl.
File metadata
- Download URL: gresecml-0.3.3-py3-none-any.whl
- Upload date:
- Size: 552.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96809b58bc39512087bb213dbb13745fc492d75669b630c4e6ce7c3b6e44da64
|
|
| MD5 |
ed5a74eb6b4889b31378dcd2b3404e55
|
|
| BLAKE2b-256 |
1017dd50a75e441c32ae78d2dcc9c175242991d8f6de60b952668c3c044441e6
|