Skip to content
Projects

About

An open source tool for detecting website blocks, downdetecting, and network analysis

Systems & Infrastructure

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

An open source tool and python library for detecting website blocks, downdetecting and network analysis

Explore the docs »

Getting Started · Basic Usage · Pitchhut · Context7 · Deepwiki · Latest Documentation · License


GitHub License GitHub forks GitHub commits since latest release GitHub Release Date GitHub Actions Workflow Status GitHub Actions Workflow Status PyPI - Downloads PyPI - Version GitHub contributors

Nadzoring (from Russian "надзор" — supervision/oversight + the English "-ing" suffix) is a free and open-source command-line tool and Python library designed for in-depth network diagnostics, service availability monitoring, and website block detection. It empowers you to investigate connectivity issues, analyze network configurations, and audit security postures through a comprehensive suite of tools. From DNS diagnostics (including reverse lookups, poisoning detection, and delegation tracing) to ARP spoofing monitoring, SSL/TLS certificate analysis, HTTP security header auditing, email security validation (SPF/DKIM/DMARC), and subdomain discovery — Nadzoring brings together a wide range of capabilities in a single, consistent interface.

Built from the ground up with AI-friendliness in mind, Nadzoring is fully type-annotated, enforces a strict zero-warnings linter policy, and is architected according to SOLID principles with a strong emphasis on modularity and the Single Responsibility Principle (SRP). This architectural clarity ensures that the codebase remains maintainable, testable, and easy to extend. The project's high-quality typing and well-structured domain logic make it equally suitable for use as a reliable Python library in your own applications, as well as a powerful standalone CLI tool.

Star History

Coverage Code lines MyPy Badge ruff badge

Table of Contents


Getting Started

Prerequisites

  • Python 3.12+
  • pip

Optional system utilities:

Utility Required by
traceroute / tracepath network-base traceroute (Linux)
whois network-base whois
ip / route network-base params, network-base route
net-tools network-base params on some Linux distros (sudo apt install net-tools)
ss network-base connections (Linux)
dig / nslookup security check-email (DNS TXT lookups; dnspython used when available)

Note: The Python package netifaces (used by network-base params) is distributed as source code and requires compilation on Linux. If you encounter errors during installation (e.g., gcc: command not found), install the required build tools first: sudo apt update && sudo apt install build-essential python3-dev (Debian/Ubuntu) or the equivalent for your distribution. On other platforms (Windows, macOS) pre‑compiled wheels are usually available.

Installation

pip install nadzoring

For the enhanced interactive prompt, install the optional extra:

pip install 'nadzoring[interactive]'

Verify:

nadzoring --help

Development version:

pip install git+https://github.com/alexeev-prog/nadzoring.git

Running with Docker

For Linux users, Docker provides the easiest and most stable way to run Nadzoring without system dependency issues. The container comes with all necessary network capabilities pre-configured.

📘 Detailed Docker Guide: See Docker.md for complete Docker setup instructions, including native Windows alternatives, development tips, and troubleshooting.

Quick start with Docker:

# Clone the repository
git clone https://github.com/alexeev-prog/nadzoring.git
cd nadzoring

# Build the Docker image
docker build -t nadzoring:latest .

# Create a convenient alias (add to ~/.bashrc or ~/.zshrc)
alias nadzoring='docker run --rm -it \
  --network host \
  --cap-add=NET_ADMIN \
  --cap-add=NET_RAW \
  nadzoring:latest'

# Now use Nadzoring normally
nadzoring --help
nadzoring dns resolve google.com
nadzoring network-base port-scan 192.168.1.0/24
nadzoring arp detect-spoofing

Benefits of using Docker:

  • Isolated environment — No Python version conflicts or dependency issues
  • Easy updates — Just rebuild the image with git pull && docker build
  • No system modifications — Leaves your host system untouched
  • Consistent behavior — Works the same across different Linux distributions
  • Network capabilities — Pre-configured with NET_ADMIN and NET_RAW for full functionality

Platform recommendation:

Platform Recommended Method Best For
Linux Docker (with alias) Servers, CI/CD
Linux Native (pipx) Most users, development
Windows Native (pipx) Windows-users

Note for Windows users: Docker on Windows has limitations with raw sockets and local network access. Native installation via pipx is strongly recommended for Windows. See Docker.md for Windows-specific guidance.


Basic Usage

Nadzoring uses a hierarchical command structure: nadzoring <group> <command> [OPTIONS]. The main groups are dns, network-base, security, arp, and block (also available as rkn).

Global Options

These options work with every command:

Option Short Description Default
--verbose Enable debug output with execution timing False
--quiet Suppress non-error output False
--no-color Disable colored output False
--output -o Output format: table, json, csv, html, html_table, yaml table
--save Save results to file None
--timeout Lifetime timeout for the entire operation (seconds) 30.0
--connect-timeout Connection timeout (seconds). Falls back to --timeout 5.0
--read-timeout Read timeout (seconds). Falls back to --timeout 10.0
--proxy SOCKS5 proxy URL (e.g., socks5://127.0.0.1:1080). All HTTP/HTTPS traffic uses this proxy. None

Timeout resolution order:

  1. Explicit --connect-timeout / --read-timeout
  2. Generic --timeout (applies to both phases when phase-specific not set)
  3. Module-level defaults (shown above)

Installation Diagnostics and Updates

The core group provides package-level diagnostics and self-management:

nadzoring core doctor --format json
nadzoring core check-deps --strict
nadzoring core check-permissions --verbose
nadzoring core check-network --target pypi.org --timeout 15
nadzoring core version --check
nadzoring core changelog --version 0.2.2
nadzoring core update --dry-run
nadzoring core update --yes --installer pip

All commands support table, JSON and YAML output, --quiet, and --no-color. Exit codes are 0 (OK), 1 (warning), 2 (error), and 3 (update available). Release API responses are cached for one hour. Updates target the running interpreter and require explicit --yes; dry runs never execute an installer. See the core command reference for the output schema, timeout behavior, permission checks, and installation-manager caveats.

RKN Blocking Diagnostics

The block group (alias rkn) answers a practical question: which layer of the path failed — DNS, TCP, TLS/SNI, HTTP, QUIC, or registry listing? The commands are read-only and do not change resolver, routing or TLS settings, and they do not provide circumvention instructions.

# Full layered diagnosis
nadzoring block check example.com

# One layer at a time
nadzoring block dns example.com
nadzoring block tcp example.com --port 443
nadzoring block tls example.com --sni-control control.example
nadzoring block http https://example.com/
nadzoring block quic example.com
nadzoring block protocols example.com

# ISP/ASN context and the community registry mirror
nadzoring block provider
nadzoring block registry example.com

# Catalogue of current blocking methods and detection signatures
nadzoring block methods --layer tls

# The same group under the short alias
nadzoring rkn check example.com --summary-only

block check returns one summary row per target plus one row per layer, with status, reason, confidence and detail. A timeout is reported as suspicious rather than proof, and a registry hit is marked as non-official: the mirror is community-maintained, and a listing does not prove that the current ISP enforces it. See the block command reference for the full detection model, reason tokens and limitations.

Interactive Shell

Run multiple diagnostics without restarting the CLI:

$ nadzoring --interactive
# Short form: nadzoring -i
nadzoring v0.3.0 | type 'help' for commands, 'exit' to quit
nadzoring> dns resolve example.com
nadzoring> set output json
nadzoring> dns reverse 8.8.8.8 --save "reverse lookup.json"
nadzoring> dns resolve example.org --output table
nadzoring> help dns resolve
nadzoring> exit

All existing command groups and command-level flags work unchanged. set output sets a session-only default (table, json, csv, html, html_table, or yaml); an explicit --output / -o overrides it for one command. Use help [command ...] for Click help, clear to clear the screen, and exit, quit, or Ctrl-D to leave. Ctrl-C cancels the current input or command without leaving the session.

The optional interactive extra provides a prompt_toolkit prompt with Tab completion for commands, options, and choice values. Without it, the shell uses readline where available, or bare input() without completion. History is shared across backends and persisted in ~/.nadzoring_history. It includes command arguments: avoid entering secrets and delete the file to clear persisted history. History access failures warn without stopping the shell. Shell quoting is supported; pipes, redirection, variable expansion, and operating-system commands are not executed.

Shell Completions

Nadzoring provides tab-completion support for bash, zsh, fish, and PowerShell. Enable it for your preferred shell using the commands below.

Bash

Add to ~/.bashrc (or ~/.bash_profile on macOS):

echo 'eval "$(nadzoring completion bash)"' >> ~/.bashrc
source ~/.bashrc

Alternative — save to a file and source it:

nadzoring completion bash > ~/.nadzoring-complete.bash
echo 'source ~/.nadzoring-complete.bash' >> ~/.bashrc

Zsh

Add to ~/.zshrc:

echo 'eval "$(nadzoring completion zsh)"' >> ~/.zshrc
source ~/.zshrc

Or save to a file in your fpath:

nadzoring completion zsh > "${fpath[1]}/_nadzoring"

Fish

Save directly to Fish completions directory:

nadzoring completion fish > ~/.config/fish/completions/nadzoring.fish

Or source it temporarily:

nadzoring completion fish | source

PowerShell

Add to your PowerShell profile ($PROFILE):

nadzoring completion powershell >> $PROFILE

To reload the profile immediately:

. $PROFILE

Or use it in the current session only:

nadzoring completion powershell | Invoke-Expression

Testing Completions

After installation, type nadzoring followed by TAB to see available commands:

nadzoring [TAB]
# Should show: arp  block  completion  dns  network-base  rkn  security

Type a command followed by space and TAB to see options:

nadzoring dns [TAB]
# Should show: resolve  reverse  check  trace  compare  health  benchmark  poisoning  monitor

Manual Activation (without saving to profile)

If you don't want to modify your shell profile, you can activate completions manually:

# Bash / Zsh
source <(nadzoring completion bash)

# Fish
nadzoring completion fish | source

# PowerShell
nadzoring completion powershell | Invoke-Expression

Troubleshooting Completions

Completions not working? Check these common issues:

  1. Shell not reloaded — restart your terminal or run source ~/.bashrc (bash) / source ~/.zshrc (zsh)
  2. Wrong shell — ensure you're using the correct completion command for your shell
  3. PATH issue — verify nadzoring is in your PATH: which nadzoring
  4. Completion not registered — run the activation command directly to see if there are any errors

Debugging bash completions:

# Enable debug output
set -x
nadzoring [TAB]
set +x

Check if completion is registered:

# Bash
complete -p | grep nadzoring
# Should output: complete -o nosort -F _nadzoring_completion nadzoring

# Zsh
echo $fpath | grep nadzoring

Show installation hints:

nadzoring completion hints bash      # For bash
nadzoring completion hints zsh       # For zsh
nadzoring completion hints fish      # For fish
nadzoring completion hints powershell  # For PowerShell

Completions Commands Reference

Command Description
nadzoring completion bash Generate bash completion script
nadzoring completion zsh Generate zsh completion script
nadzoring completion fish Generate fish completion script
nadzoring completion powershell Generate PowerShell completion script
nadzoring completion hints <shell> Show detailed installation hints

For complete command reference, Python API documentation, and advanced examples, see the full documentation.


Documentation

Version Link Status
main Latest (development) 🟡 Development
v0.5.0 Release 🟢 Stable
v0.4.0 Legacy ⚪ Legacy
v0.3.0 Legacy ⚪ Legacy
v0.2.2 Legacy ⚪ Legacy
v0.2.1 Legacy ⚪ Legacy
v0.2.0 Legacy ⚪ Legacy
v0.1.9 Legacy ⚪ Legacy
v0.1.8 Legacy ⚪ Legacy
v0.1.7 Legacy ⚪ Legacy
v0.1.6 Legacy ⚪ Legacy
v0.1.5 Legacy ⚪ Legacy
v0.1.4 Legacy ⚪ Legacy
v0.1.3 Legacy ⚪ Legacy
v0.1.2 Legacy ⚪ Legacy
v0.1.1 First version ⚪ Legacy

The documentation site includes:


LLM-friendly documentation

For AI assistants and language models:

  • llms.txt — concise project overview and links to essential documentation.
  • llms-full.txt — consolidated project documentation for larger context windows.

Contributing

Contributions are welcome! Please read CONTRIBUTING.md before submitting a pull request.

Workflow:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Areas we'd love help with:

  • Additional DNS record type support
  • New health check validation rules
  • CDN network database expansion
  • Performance optimisations
  • Additional output formats
  • ARP detection heuristics
  • New network diagnostic commands
  • Extended security auditing (HSTS preload check, certificate transparency monitoring, CAA record validation)

License & Support

This project is licensed under the GNU GPL v3 License — see LICENSE for details.

For commercial support or enterprise features, contact [email protected].

📖 Explore Docs · 🐛 Report Issue

(back to top)


Copyright © 2025 Alexeev Bronislav. Distributed under GNU GPL v3 license.

Explore related projects

Loading…