Skip to main content

Network diagnostics toolkit

Project description

ZapNet ⚡

License: MIT Python Version PyPI Version

中文 | English

ZapNet is a high-performance network diagnostics toolkit with Multi-Protocol Support, including TCP and UDP.

Key Features

  • 🚀 Dual Protocol Engine: TCP full-duplex / UDP broadcast
  • 📊 Traffic Analytics: Real-time connection monitoring
  • 🔧 Smart Config: YAML-driven test scenarios
  • 💾 Data Archiving: Raw packet capture (ASCII/Hex)
  • 🌍 Cross-Platform: Windows/macOS/Linux support

Installation

# For production use
pip install zapnet

# Development setup
git clone https://github.com/luhuadong/zapnet.git
cd zapnet && pip install -e .[dev]

Quick Start

TCP Server/Client

# Start TCP server
zapnet tcp server --port 5555

# Start TCP client
zapnet tcp client --host 127.0.0.1 --port 5555 --data "Hello, World"
# Send hexadecimal content
zapnet tcp client --host 127.0.0.1 --port 5555 --hex "A1B2C3D4"
# Another form to fill in target IP and port
zapnet tcp client --target 127.0.0.1:5555 --hex "A1B2C3D4"

UDP Server/Client

# Start UDP server
zapnet udp server --port 6666

# Start UDP client
zapnet udp client --host 127.0.0.1 --port 6666 --data "Hello, World"
# Send hexadecimal content
zapnet udp client --host 127.0.0.1 --port 6666 --hex "A1B2C3D4"
# Another form to fill in target IP and port
zapnet udp client --target 127.0.0.1:6666 --hex "A1B2C3D4"

Device Discovery (UDP Broadcast)

# Send probe broadcast
zapnet udp client --target 192.168.1.255:9999 --broadcast --hex "A1B2C3D4"

# Monitor responses
zapnet udp server --port 9999 --filter "hex_contains(payload, 'C3D4')" --output devices.log

Network Sniffing (UDP)

# Capture DNS queries
zapnet udp server --port 53 --hex --stats 5

# Send custom DNS query
zapnet udp client --target 8.8.8.8:53 --hex "b362010000010000000000000377777706676f6f676c6503636f6d0000010001"

TCP Stress Testing

# Start TCP server
zapnet tcp server --port 9000 --max-conn 50 --timeout 300

# Simulate high concurrency
zapnet tcp client --host 127.0.0.1 --port 9000 --threads 10 --duration 60 --message "LOAD_TEST"

File Transfer

# Send file (TCP)
zapnet tcp client --host 192.168.1.100 --port 8888 --file data.zip

# Receive files
zapnet tcp server --port 8888 --output received_files/

Advanced Configuration

You can set default parameters through ZapNet's configuration file config.yaml, for example:

network:
  tcp:
    buffer_size: 4096
    keepalive: true
  udp:
    broadcast_ttl: 64

logging:
  level: debug
  rotation: 100MB

security:
  allowed_ips: ["192.168.1.0/24"]

Launch with:

zapnet --config config.yaml

License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zapnet-0.1.1.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zapnet-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file zapnet-0.1.1.tar.gz.

File metadata

  • Download URL: zapnet-0.1.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for zapnet-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ba846b9024f79d10db8ba8d745768df16773bc484e820a11f6bc8a867edde38a
MD5 15da8f0a133adcda1e0de7021d2990d5
BLAKE2b-256 2ffd85df4ab1ca70c6d6260cd7095f5401f0ed1f58584c65e2cc1c08ca3ba2a6

See more details on using hashes here.

File details

Details for the file zapnet-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zapnet-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for zapnet-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1977aa3c959f7d975fd408cbfdd617489ea5173f6fdd675f136efbc96fe9a9cb
MD5 be8560fc79669729075fa6bc71073eda
BLAKE2b-256 d4b2b037bfccefb3279d5f3c59f9edbcc2ef30edfa70fde4ef37ebdb3a59ff6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page