Terminal-based modular cybersecurity monitoring platform
Project description
PacketPulse 🛡️
Terminal-based interactive cybersecurity monitoring platform
Repository: https://github.com/tejppatil/PacketPulse
pip install packetpulse
sudo packetpulse
That's it. An interactive menu guides you through everything.
How it works
Run sudo packetpulse and you get a numbered main menu:
1 Packet Sniffer Deep capture — HTTP headers, DNS, GeoIP, process attribution
2 URL Scanner Scan a URL or watch live traffic for malicious sites
3 DNS Monitor Watch every DNS query — flag DGA domains, beaconing, bad TLDs
4 Device Forensics Profile USB devices and LAN devices in depth
5 Full Pipeline Run Sniffer + URL Scanner + DNS Monitor simultaneously
0 Exit
Each module asks you everything it needs before running — interface, duration, options — then runs, then returns you to the menu.
Each module
1 — Packet Sniffer
Prompts: interface · BPF filter · duration · HTTP/DNS/GeoIP on/off · save PCAP?
Shows every packet with full detail:
- L2: source + destination MAC
- L3: IP version, TTL
- L4: TCP flags, sequence numbers, window size
- L7 HTTP: full request headers, User-Agent, Referer, POST body; response status, Server, Set-Cookie
- L7 DNS: query name, type (A/AAAA/MX/TXT), response IPs
- GeoIP: country, city, ISP for every remote IP
- rDNS: reverse hostname of destination
- Process: which app on your machine sent this packet
2 — URL Scanner
Prompts: single URL or live mode · interface (live) · duration (live) · page scan on/off
Single URL — 4 checks:
- URL structure (TLD, IP-as-host, entropy, encoding, keywords, punycode)
- SSL/TLS certificate (validity, expiry, weak version, CN mismatch)
- Reputation (VirusTotal 90 engines, Google Safe Browsing, PhishTank)
- Page content (obfuscated JS, hidden iframes, phishing forms, base64 blobs)
Live mode — passively watches all HTTP + DNS traffic, auto-scans every URL seen.
3 — DNS Monitor
Prompts: interface · duration · DGA/keywords/beaconing on/off · save results?
Flags:
- DGA domains (high Shannon entropy = malware C2)
- High-risk TLDs (.tk .ml .xyz .top .win .loan …)
- Suspicious keywords (botnet, c2, shell, exploit, ransom …)
- Beaconing (same domain 30+ queries)
- Punycode homograph attacks
- Very long domains (DNS tunneling)
4 — Device Forensics
Prompts: USB / LAN / both / USB live watch · subnet · nmap on/off · save JSON?
USB (via pyudev — exact kernel data): product name, manufacturer, serial number, VID/PID, USB speed, power draw, device class, driver, OS platform, session history, volume label, filesystem, capacity, free/used space, mount point, UUID
LAN (ARP scan + passive fingerprint + optional nmap): MAC → manufacturer, hostname (rDNS + mDNS + NetBIOS), OS fingerprint, nmap open ports + services + versions, risk flagging (dangerous ports)
5 — Full Pipeline
Prompts: interface · duration · which modules to enable
Runs selected modules as parallel threads, all output to the same terminal.
Installation
pip install packetpulse
# Optional — for full URL reputation checks
export PACKETPULSE_VT_KEY="your_virustotal_api_key"
export PACKETPULSE_GSB_KEY="your_google_safe_browsing_key"
# Optional — for offline GeoIP (faster, no rate limit)
export PACKETPULSE_GEOIP_DB="/path/to/GeoLite2-City.mmdb"
sudo packetpulse
Requires Python 3.11+, Linux (pyudev for USB), root/sudo for packet capture.
Security-safe configuration
Keep API keys in environment variables, not in source files.
# from project root
cp .env.example .env
Then set your keys in .env (local only, never commit):
PACKETPULSE_VT_KEY=your_virustotal_api_key
PACKETPULSE_GSB_KEY=your_google_safe_browsing_key
PACKETPULSE_GEOIP_DB=/path/to/GeoLite2-City.mmdb
Sensitive files and generated capture outputs are excluded via .gitignore.
Publish to PyPI
You can distribute PacketPulse through pip so users install with:
pip install packetpulse
1) Build distribution artifacts
python -m pip install --upgrade build twine
python -m build
This generates:
dist/*.whl(wheel)dist/*.tar.gz(source distribution)
2) Validate package metadata
python -m twine check dist/*
3) Upload to TestPyPI (recommended first)
python -m twine upload --repository testpypi dist/*
4) Upload to PyPI
python -m twine upload dist/*
5) Verify install
pip install packetpulse
packetpulse
Note: pip install downloads and installs the package for users automatically.
With a pure-Python package, source files are still present in the installed environment.
If you need to hide implementation details, you need a compiled distribution strategy.
One-command publish (local)
PowerShell:
./scripts/publish.ps1 -Repository testpypi
./scripts/publish.ps1 -Repository pypi
Cross-platform Python:
python scripts/release.py --repository testpypi
python scripts/release.py --repository pypi
GitHub Actions trusted publishing
This repository includes a workflow at .github/workflows/publish.yml.
It supports:
- Manual dispatch to
testpypiorpypi - Auto-publish to
pypion tag push (v*)
Before first run, configure trusted publishing in both indexes:
- Create project on TestPyPI/PyPI (same package name).
- In each project, add a Trusted Publisher:
- Owner: your GitHub org/user
- Repository: tejppatil/PacketPulse
- Workflow:
publish.yml - Environment:
testpypiorpypi
After this, no API token is needed in GitHub secrets for publish jobs.
Optional binary distribution
For executable-only delivery, build a standalone binary (less source visibility than plain pip install):
./scripts/build-binary.ps1 -Clean
Output:
dist/packetpulse(Linux/macOS)dist/packetpulse.exe(Windows)
Project structure
packetpulse/
├── packetpulse/
│ ├── __init__.py ← entry point
│ ├── cli.py ← interactive menu + all module prompts
│ ├── sensor/sensor.py ← deep packet sniffer (Scapy)
│ ├── urlscan/url_scanner.py ← URL threat scanner
│ ├── dns/dns_monitor.py ← DNS query monitor
│ ├── forensics/forensics.py ← USB + LAN device forensics
│ ├── core/config.py ← configuration
│ ├── core/logger.py ← logging
│ └── utils/helpers.py ← GeoIP, entropy, file helpers
├── pcap_store/ ← all output files
│ ├── *.pcap
│ ├── urls/*.json
│ ├── dns/*.json
│ └── forensics/*.json
├── pyproject.toml
├── requirements.txt
└── README.md
License
MIT
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 packetpulse-1.0.1.tar.gz.
File metadata
- Download URL: packetpulse-1.0.1.tar.gz
- Upload date:
- Size: 74.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
276353cbc2a840f54dd7d611336de231148c3bfa1ee8a7bfe1b27f4c5b7ca620
|
|
| MD5 |
1a76134dad8714f213506a269cf1cc7b
|
|
| BLAKE2b-256 |
c5fe884cbfd5cd0958998b4183b7a1ae9c4ed178ec62423130c9f0726a8e0261
|
Provenance
The following attestation bundles were made for packetpulse-1.0.1.tar.gz:
Publisher:
publish.yml on tejppatil/PacketPulse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
packetpulse-1.0.1.tar.gz -
Subject digest:
276353cbc2a840f54dd7d611336de231148c3bfa1ee8a7bfe1b27f4c5b7ca620 - Sigstore transparency entry: 1328148957
- Sigstore integration time:
-
Permalink:
tejppatil/PacketPulse@762acc98b58fc8f3a5ecda8c29d07b9d2019bcdd -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/tejppatil
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@762acc98b58fc8f3a5ecda8c29d07b9d2019bcdd -
Trigger Event:
push
-
Statement type:
File details
Details for the file packetpulse-1.0.1-py3-none-any.whl.
File metadata
- Download URL: packetpulse-1.0.1-py3-none-any.whl
- Upload date:
- Size: 75.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7fcb008eef3ad09a9843a63d04f7b17cca910a7545887bd48596fb23f59a000
|
|
| MD5 |
afc9e02bd58a4b420e40498dc6d7859e
|
|
| BLAKE2b-256 |
29b55701391d7e61e99ca2366a4defa2f3b96d9e0d8360d91933d0ffa39a7661
|
Provenance
The following attestation bundles were made for packetpulse-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on tejppatil/PacketPulse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
packetpulse-1.0.1-py3-none-any.whl -
Subject digest:
c7fcb008eef3ad09a9843a63d04f7b17cca910a7545887bd48596fb23f59a000 - Sigstore transparency entry: 1328148965
- Sigstore integration time:
-
Permalink:
tejppatil/PacketPulse@762acc98b58fc8f3a5ecda8c29d07b9d2019bcdd -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/tejppatil
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@762acc98b58fc8f3a5ecda8c29d07b9d2019bcdd -
Trigger Event:
push
-
Statement type: