Skip to main content

ipsak

The IP Swiss Army Knife -- fast IP, CIDR, and domain information queries for network operations.

One command gives you ASN, geolocation, WHOIS, DNS, RPKI validation, DNSBL reputation, subnet math, and traceroute -- all in parallel.

Quickstart

uvx ipsak 8.8.8.8

Demo

$ ipsak 8.8.8.8

  8.8.8.8 · dns.google · AS15169 GOOGLE - Google LLC, US · Ashburn, US · Public

                Network                              Location
  ASN         AS15169                    Country     United States (US)
  Org         GOOGLE - Google LLC, US    Region      Virginia
  Prefix      8.8.8.0/24                City        Ashburn
  RIR         ARIN                      ISP         Google LLC
  RPKI        ✓ Valid                    Org         Google Public DNS
                 WHOIS                   TZ          America/New_York
  Range       8.8.8.0 - 8.8.8.255       Coords      39.0300, -77.5000
  Name        GOGL
  Org         Google LLC                      Reputation
  Abuse       network-abuse@google.com   DNSBL    Clean (6 lists checked)
  Country     US
  Created     2023-12-28
  Updated     2023-12-28
$ ipsak dns google.com

  google.com DNS
  A         142.251.35.142
  AAAA      2607:f8b0:400f:801::200e
  MX        10 smtp.google.com.
  NS        ns1.google.com.
            ns4.google.com.
            ns2.google.com.
            ns3.google.com.
  TXT       "v=spf1 include:_spf.google.com ~all"
            ...
  SOA       ns1.google.com. dns-admin.google.com. ...
$ ipsak calc 10.0.0.0/24

  10.0.0.0/24 Subnet
  Network         10.0.0.0
  Broadcast       10.0.0.255
  Netmask         255.255.255.0
  Wildcard        0.0.0.255
  Prefix          /24
  First Host      10.0.0.1
  Last Host       10.0.0.254
  Addresses       256
  Usable          254
  IP Version      IPv4

Install

Requires Python 3.11+.

Run without installing

uvx ipsak 8.8.8.8

Install with uv

uv tool install ipsak
ipsak 8.8.8.8

Install with pipx or pip

pipx install ipsak
# or
pip install ipsak

Install from source

git clone https://github.com/linsomniac/ipsak.git
cd ipsak
uv tool install .

Usage

ipsak <target>              # Full info (ASN, geo, WHOIS, DNS, RPKI, reputation)
ipsak dns <domain|ip>       # DNS records or reverse DNS
ipsak whois <target>        # WHOIS/RDAP lookup
ipsak calc <cidr>           # Subnet calculator
ipsak trace <target>        # Traceroute (fast parallel ICMP; needs root for raw sockets)
ipsak myip                  # Show public and local IP addresses

The target can be an IPv4/IPv6 address, a CIDR block, or a domain name. When no subcommand is given, ipsak defaults to info.

Options

Flag Description
--json / -j Output as JSON
--trace / -t Include traceroute in info output
--timeout / -T Lookup timeout in seconds (default: 10)
--version / -V Show version

Traceroute

ipsak trace uses a fast parallel raw-ICMP engine when it has the privileges to open raw sockets (root, sudo, or CAP_NET_RAW). If it doesn't, it falls back to the system traceroute or tracepath binary.

sudo ipsak trace 8.8.8.8
# or grant the capability once:
sudo setcap cap_net_raw+ep "$(readlink -f "$(which ipsak)")"
ipsak trace 8.8.8.8

What it queries

All lookups run concurrently for fast results:

  • ASN -- Team Cymru DNS mapping
  • Geolocation -- ip-api.com
  • WHOIS/RDAP -- via ipwhois library
  • DNS -- forward (A, AAAA, CNAME, MX, NS, TXT, SOA) and reverse (PTR)
  • RPKI -- Cloudflare RPKI validator
  • Reputation -- DNSBL checks (Spamhaus, Barracuda, SORBS, etc.)
  • Bogon detection -- RFC 1918, RFC 5737, loopback, link-local, etc.
  • Subnet calculator -- network/broadcast/host range math

License

CC0 1.0 Universal -- public domain. See LICENSE.

Metadata

Release files for ipsak 0.9.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipsak 0.9.2
File Size Uploaded
ipsak-0.9.2.tar.gz 45.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ipsak 0.9.2
File Interpreter ABI Platform
ipsak-0.9.2-py3-none-any.whl Python 3 none any Details

Total release size: 79.0 kB

Release files / ipsak-0.9.2.tar.gz

Download URL ipsak-0.9.2.tar.gz
Size 45.3 kB
Tags Source
SHA-256 checksum
How to use checksums
867f98e279dd10b2af417e7ac60ce878f26d0e841b87f351003db60545e0d915
BLAKE2b-256 checksum
How to use checksums
70c89a67fb3cce280fc93f3b4457f04422961ccc9f2fac27bdb0a38f85520404
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.

Transparency log

Release files / ipsak-0.9.2-py3-none-any.whl

Download URL ipsak-0.9.2-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f4957887e5edc5bbc8cff88ab284d8cf2380bbd37eab1215c9f7919aaf818a1
BLAKE2b-256 checksum
How to use checksums
ad94d4e2824a1a80673d83e2653a9a3a26f829c8ff258ef9e9d72dfb326c2188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.9.2 This release

2 release files

0.9.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page