NetWatcher CLI
NetWatcher CLI monitors outbound network connections on your local machine and enriches them with IP geolocation and ownership data to help identify potentially suspicious processes. See example output below.
Features
- Displays geolocation and BGP table details about remote internet connections.
- Retrieves process information associated with each connection.
- Flags reasons to suspect possibly malicious activity.
- Optionally generates threat assessment as HTML report.
- Optionally outputs serialized logs to disk.
See the CLI docs for the full CLI usage reference.
Example Output
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ IP ┃ Geolocation ┃ Ownership ┃ Threat Level ┃ Assessment ┃ Process Info ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 8.8.8.8 │ City, State Zip │ - ISP: Example ISP │ Suspicious │ - Hosting provider │ - Executable Path: … │
│ │ Country │ - Org: Example Org │ │ - Proxy or VPN detected │ - Command Line: … │
│ │ │ - AS: ASEXAMPLE │ │ ... │ - Process Name: sus.exe │
│ │ │ - AS Name: EX │ │ │ - PID: 1234 │
│ │ │ ... │ │ │ ... │
└─────────┴─────────────────┴────────────────────┴──────────────┴─────────────────────────┴─────────────────────────┘
...
Table of Contents
Installation
Install from PyPI:
pip install netwatcher-cli
Basic Usage
$ nw scan [OPTIONS]
Options:
-c, --country-code TEXT: User's ISO 3166-1 alpha-2 two-leter country code. [default: US]--html-dir PATH: Optional directory location for which to write an HTML report.--lang TEXT: Language code for the IP API response. [default: en]--log-dir PATH: Optional directory location for which to write a log file.-v, --verbose: Increase verbosity (-v, -vv, -vvv) [default: 1]--help: Show this message and exit.
See the CLI docs for the full CLI usage reference.
Development
-
Install
uv:To manage dependencies and install NetWatcher CLI efficiently, use uv. You can install
uv(here). -
Install Python >= 3.9:
uv python install 3.13
- Create a virtual environment and activate it:
uv venv --python 3.13
# macOS and Linux
source .venv/activate/bin
# Windows
.venv\Scripts\activate
- Install dependencies:
uv pip install -r pyproject.toml --all-extras
- Run unit tests
uv run pytest [OPTIONS]
Some useful options:
-s– allowsprint()output-vvv– increases verbosity
See the pytest docs for full usage and configuration details.
- Run pre-commit (requires git-cliff, see Changelog Generation for more) to run the formatter/linter (Ruff), type checker (Pyright), doc generators (Typer/git-cliff), etc.
uv run pre-commit run --all-files
Changelog Generation
This project uses git-cliff to generate changelogs automatically based on conventional
commit messages. To use or update the changelog, you must have git-cliff installed locally or in your CI environment.
You can do this via cargo, the Rust package manager (which you can install
here):
cargo install git-cliff
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Metadata
Release files for netwatcher-cli 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| netwatcher_cli-0.2.1.tar.gz | 80.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| netwatcher_cli-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 95.8 kB
Release files / netwatcher_cli-0.2.1.tar.gz
| Download URL | netwatcher_cli-0.2.1.tar.gz |
|---|---|
| Size | 80.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11b4dd4061cf34ab90c87fe278e717c6d93cbfa0a632a3860a1de487edd161a3
|
|
BLAKE2b-256 checksum How to use checksums |
c0b020997d634c70ee0d612196d1d9b12a00fc696051aac629f6f08ad604a491
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Release files / netwatcher_cli-0.2.1-py3-none-any.whl
| Download URL | netwatcher_cli-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a29d761dbecc45764b828795a3fba01129a5af577f67d8d13aa3f754b1ebf150
|
|
BLAKE2b-256 checksum How to use checksums |
3c2ddab03c5415b452d048f45651e525401c27715cd6e920caec0f6e295d1aa6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|