coding-python-network-probelisted
Install: claude install-skill bitranox/bitranox-skills
# Network probing from Python, unprivileged on the default paths
## Overview
Use `ipscout`. It does ICMP echo, traceroute, port scanning, neighbour and
route lookup, interface and subnet enumeration entirely in-process: no
subprocess, and no elevated rights on the default paths.
The two hard parts are both handled:
- **Unprivileged ICMP.** Linux and macOS use `SOCK_DGRAM`/`IPPROTO_ICMP`, the
kernel's "ping socket". Windows goes through `iphlpapi.dll` (`IcmpSendEcho`)
by ctypes. Neither needs elevation. Raw sockets, which the usual
alternatives reach for, do.
- **No output parsing.** Nothing shells out to `ping`, `tracert`, `arp`, `ip`
or `ifconfig`, so there is no locale-dependent regex to break and no process
spawned per probe.
## Install
```bash
uv pip install ipscout # library
uvx ipscout ping 1.1.1.1 # CLI, no install
```
Python 3.10+.
## Quick reference
| Task | Call |
|-----------------------------------|----------------------------------------------------------------------|
| Ping one host | `ping("1.1.1.1", 4)` |
| Sweep many, concurrently | `ping_many(hosts, concurrency=64)` |
| Is it up, by any means | `is_reachable(host)` |
| Path to a host | `traceroute(host)`