Skip to content

sakhile-bit/ping-sweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Authorized Ping Sweeper

This repository contains an authorized-only ping sweep utility designed for security, operations, and inventory tasks on networks you own or have written permission to assess. Scanning systems without permission is illegal and unethical.

Features

  1. CIDR parsing – supply IPv4 or IPv6 ranges (e.g., 10.0.0.0/24).
  2. Concurrency – configurable worker pool for faster sweeps.
  3. Timeout controls – tune per-host ping timeouts.
  4. Interactive safeguards – confirmations for large networks or when permission is uncertain.
  5. Structured logging – console plus optional file logging.
  6. JSON reporting – export results for dashboards or evidence.

Usage

python authorized_ping_sweeper.py \
  --network 192.168.1.0/24 \
  --timeout 1.5 \
  --workers 128 \
  --log-file sweep.log \
  --json-out sweep.json \
  --label "HQ inventory"

Important Flags

Flag Description
--network / -n Required. Network in CIDR notation.
--timeout / -t Timeout per host in seconds (default: 1).
--workers / -w Number of concurrent ping workers (default: 64).
--retries / -r Ping attempts per host (default: 1).
--rate-limit Cap submissions to N pings per second (default: unlimited).
--log-file Optional log file path; console logging always enabled.
--json-out Write detailed JSON results for automation/reporting.
--csv-out Dump CSV table (ip, reachable, latency, error).
--label Friendly label embedded in JSON output.
--targets-file / -f Scan explicit IP list (one per line) in addition to or instead of --network.
--show-unreachable Print unreachable hosts with failure reasons.
--assume-yes Skip interactive confirmations (only when you already have authorization).
--dry-run Enumerate targets and exit without sending any packets.

Safety Workflow

  1. Confirm you have explicit authorization (written approval).
  2. Use --dry-run first on large scopes to verify targeting.
  3. Start with smaller subnets before scanning large address spaces.
  4. Respect maintenance windows or use --rate-limit to avoid saturating links.
  5. Store logs and exported JSON/CSV securely; they may contain sensitive topology data.

Testing

The script relies on the system ping binary, so automated tests are environment-specific. To perform a dry run:

  1. Use a loopback or small lab subnet (127.0.0.1/32, 192.168.56.0/30, etc.).
  2. Invoke the script with --network set to that subnet.
  3. Inspect console output and any generated log/JSON files to verify formatting.

Disclaimer

This tool is provided for educational and defensive purposes. Do not scan networks you do not own or manage without written permission from the owner. The authors are not responsible for misuse. "# ping-sweeper"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors