Technical OSINT Fundamentals

Code Examples: Interpret Address and Hosting Context

Connecting to LMS... Progress: in progress

Code Examples

Join DNS Answers to Provider Notes

import csv


provider_by_netblock = {
    "93.184.216.0/24": "example public provider",
    "203.0.113.0/24": "documentation network",
}


def provider_for(address: str) -> str:
    import ipaddress

    ip = ipaddress.ip_address(address)
    for network, provider in provider_by_netblock.items():
      if ip in ipaddress.ip_network(network):
          return provider
    return "unknown from current notes"


with open("hosting-context.csv", "w", newline="", encoding="utf-8") as output:
    writer = csv.DictWriter(output, fieldnames=["hostname", "address", "provider", "limitation"])
    writer.writeheader()
    writer.writerow({
        "hostname": "www.example.org",
        "address": "93.184.216.34",
        "provider": provider_for("93.184.216.34"),
        "limitation": "provider context does not prove application control",
    })

Represent Geolocation as an Estimate

{
  "address": "93.184.216.34",
  "geo_sources": [
    {
      "source": "provider-a",
      "country": "US",
      "observed_at": "2026-06-28T15:00:00Z"
    },
    {
      "source": "provider-b",
      "country": "US",
      "observed_at": "2026-06-28T15:02:00Z"
    }
  ],
  "report_language": "Geolocation sources estimate this address in the US.",
  "limitation": "This does not identify a physical server position or responsible party."
}