Using Local Packet Whisperer (LPW, Chat with PCAP/PCAPNG files locally, privately!
Project description
Local Packet Whisperer (LPW)
Local Packet Whisperer (LPW) is an innovative project designed to facilitate local and private interactions with PCAP/PCAG NG files using a combination of Ollama, Streamlit, and PyShark. This tool serves as a 100% local assistant powered by customizable local large language models (LLMs), with features including Streamlit for the front end and PyShark for packet parsing, LPW is easily installable via pip, allowing users to seamlessly connect to an Ollama server over a network
If you are using this project as part of your research, kindly consider citing this project as follow:
[1]V. Kumar, “Local Packet Whisperer (LPW)”. Zenodo, Nov. 30, 2024. doi: 10.5281/zenodo.14251995.
Features
- 100% local, private PCAP assistant powered by range of local LLMs at your control, powered by Ollama
- Uses streamlit for the FE and pyshark for the pcap parsing needs
- Available as a pip installable package. So just pip it away! 😎
- Connect LPW to a Ollama server running over a network.
- Experimental Support for Agentic Insights
(NGAP only for now).
Refer Release History for more details info on what each release contains.
Requirements
-
Download & Install Ollama by referring to instructions according to your OS here
-
Pull any Chat based LLM models to use with LPW.
ollama pull dolphin-mistral:latest
-
If not running the desktop application, Start Ollama Server (refer here)
-
You also need to install
tsharkexecutable. You could either install the Wireshark Application or simply usebrew install tshark.⚠️Warning⚠️ If you don't perform this step, you may see below error
TSharkNotFoundException: TShark not found. Try adding its location to the configuration file.
Installation & Usage
- Install/Upgrade LPW using pip
pip install -U lpw
- This will install
lpwCLI in your machine. Now simply Start or Stop LPW as follows:
lpw {start or stop}
lpw -h #for help
Refer User Guide for more details.
Local Development
- Clone this repo and install requirements
git clone https://github.com/kspviswa/local-packet-whisperer.git
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- Run streamlit app & point to
http://localhost:8501
streamlit run bin/lpw_main.py
or simply
<lpw dir>/bin/lpw {start or stop}
Contributions
I just created this project based on inspiration from similar project called Packet Buddy which used open AI. But if you find this useful and wanna contribute bug fixes, additional features feel free to do so by raising a PR or open issues for me to fix. I intend to work on this as a hobby unless there is some interest in the community.
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 Distributions
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 lpw-0.2.5.0-py3-none-any.whl.
File metadata
- Download URL: lpw-0.2.5.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05248692bdd8dd72c4c291f4a5491c13c1c431fe42b5a5ba360214be91411d04
|
|
| MD5 |
d6241b195ba45fb1a2a2457a50b2c45b
|
|
| BLAKE2b-256 |
73a4601640f9b0222ab3974be8725f05e7e3dd8e8f6a2866b5a159bbe0f4212b
|