Downloads info about IP address blocks (v4 and v6) assignees from iptoasn.com database.
Creates and takes over _tmp
directory, creates/overwrites data.json
file with JSON array of objects in format:
{
"ip_range": ["<first-ip>", "<last-ip>"],
"ip_version": <4|6>,
"assigned": <true|false>, // is this block assigned to someone
"as": { // autonomous system that the ip block is assigned to (or null in every field if this block is not assigned)
"number": "<asn>", // the AS number (ASN)
"name": "<name>", // the AS name
"country": "<country-code>" // country that the AS belongs to, in ISO 3166-1 alpha-2 format
}
}