← ClaudeAtlas

coding-python-network-probelisted

Use when Python code needs to ping a host, sweep hosts for reachability, measure round-trip time or packet loss, run a traceroute, scan ports, find a MAC address or the host holding one, read the neighbour/ARP cache, look up the default gateway or a route, inspect local interfaces and subnets, reach an IPv6 link-local (fe80::) address that needs its interface zone, send a wake-on-LAN packet, find the path MTU, or watch a DHCP handshake to learn the address of a machine that has just been started and does not have one yet - especially when it must run as an ordinary user with no root, sudo, Administrator or CAP_NET_RAW, and must not shell out to ping, tracert, arp, ip, ifconfig or netstat. Also use when reaching for icmplib, scapy, python-nmap, netifaces, or subprocess around a system network command, or for tcpdump/tshark to watch a VM or container boot and find its address.
bitranox/bitranox-skills · ★ 1 · AI & Automation · score 57
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)`