Skip to content

JSON export

The following contains explanations of each field in the JSON output generated by the Lookup and NXDOMAIN tools, as well as some examples of how this output can be used in practice.

The output contains detailed information on analyzed domains, including typosquatted permutations, IP data, classifications, and more.

type: string Required

The typosquatted or analyzed domain

exaample.com


type: string Required

Describes the method used to generate the domain permutation.

PermutationDescriptionExample
AdditionAdds an extra character to the end of a domain nameexamplez.com
BitsquattingExploits binary similarities between charactersexamp1e.com
DoubleVowelInsertionAdds characters between vowel pairsexaample.com
HomoglyphSubstitutes visually similar charactersеxample.com (Cyrillic е)
HyphenationInserts hyphens into the domainexam-ple.com
InsertionAdds a character at the start of the domainzexample.com
KeywordAdds commonly associated keywordssecureexample.com
MappedMaps certain letters to predefined substitutionsexannple.com
OmissionRemoves a character from the domainexamle.com
RepetitionDuplicates characters in the domainexampplle.com
ReplacementSubstitutes characters in the domainexemple.com
SubdomainUses subdomains to mimic legitimate domainslogin.example.com
TldReplaces the top-level domain (TLD)example.org
TranspositionSwaps character positionseaxmple.com
VowelSwapSwaps vowels in the domain nameixample.com
VowelShuffleShuffles vowels in the domain nameaxample.com

type: integer Required

The Levenshtein distance between the original domain and the typosquatted domain, measuring the number of edits needed to transform one string into the other.

7


type: object Optional

An object containing a map of IP addresses to associated IP address data.

type: string Optional

The IP address associated with the domain.

3.33.130.190

type: object Optional

An object containing the following properties.

type: integer

The ASN (Autonomous System Number) for the IP.

Example: 10732

type: string

The organization associated with the ASN.

Example: AMAZON-02

type: object Optional

An object containing the following properties.

type: string

The continent code of the IP’s location (ISO 3166-1 alpha-2).

Example: NA (North America)

type: string

The country code of the IP’s location (ISO 3166-1 alpha-2).

Example: US (United States)


type: array<object> Optional

Historical DNS observations collected from passive sources. Each object represents a single observation.

Properties:

  • rrtype (string): Record type, e.g., A, AAAA, NS, MX, TXT, CNAME
  • rrname (string): Observed value (for A/AAAA this is the IP; for NS/MX/TXT/CNAME the record value)
  • rdata (string): Queried domain
  • time_first (integer): First seen epoch seconds
  • time_last (integer): Last seen epoch seconds
  • count (integer): Number of observations
[
{ "rrtype": "A", "rrname": "142.250.186.110", "rdata": "google.com", "time_first": 1710538717, "time_last": 1758559359, "count": 3390 },
{ "rrtype": "AAAA", "rrname": "2a00:1450:4001:810::200e", "rdata": "google.com", "time_first": 1697028644, "time_last": 1755038173, "count": 2067 },
{ "rrtype": "CNAME", "rrname": "www.forwhenidle.com", "rdata": "google.com", "time_first": 1717877150, "time_last": 1746799577, "count": 5 }
]

type: object Optional

Passive TLS subjects and certificate hashes observed, keyed by IP address.

Properties per IP:

  • certificates (string[]): Certificate SHA-1/SHA-256 hashes
  • subjects (string[]): Certificate subjects (usually hostnames)
{
"172.217.17.110": {
"certificates": [
"ef3d5b04f51d97a3cded293584af6221d5d0c262",
"d99417c4d7aa394595afbe90ee515f4cd0106590"
],
"subjects": ["google.com"]
}
}

type: string Optional

The HTTP banner grabbed from the domain, providing details about the web server or service running on it (if available).

Apache/2.4.46 (Unix)


type: object Optional

An object containing the following properties.

type: number Optional

A value between 0.0 and 1.0 representing the likelihood the domain is legitimate.

0.9 (95% likely to be legitimate)


type: number Optional

A value between 0.0 and 1.0 representing the likelihood the domain is parked.

0.05 (5% likely to be parked)


type: number Optional

A value between 0.0 and 1.0 representing the likelihood the domain is used for phishing.

0.05 (5% likely to be a phishing domain)


type: string|object Optional

Contains RDAP JSON data (of type object) or WHOIS data (of type string) retrieved for the domain. This may include details such as registration status, expiration dates, and ownership information.

{
"objectClassName": "domain",
"handle": "2336799_DOMAIN_COM-VRSN",
"ldhName": "EXAMPLE.COM",
"links": [
{
"value": "https://rdap.verisign.com/com/v1/domain/EXAMPLE.COM",
"rel": "self",
"href": "https://rdap.verisign.com/com/v1/domain/EXAMPLE.COM",
"type": "application/rdap+json"
}
],
"status": [
"client delete prohibited",
"client transfer prohibited",
"client update prohibited"
],
"entities": [
{
"objectClassName": "entity",
"handle": "376",
"roles": [
"registrar"
],
"publicIds": [
{
"type": "IANA Registrar ID",
"identifier": "376"
}
],
"vcardArray": [
"vcard",
[
[
"version",
{},
"text",
"4.0"
],
[
"fn",
{},
"text",
"RESERVED-Internet Assigned Numbers Authority"
]
]
],
"entities": [
{
"objectClassName": "entity",
"roles": [
"abuse"
],
"vcardArray": [
"vcard",
[
[
"version",
{},
"text",
"4.0"
],
[
"fn",
{},
"text",
""
],
[
"tel",
{
"type": "voice"
},
"uri",
""
],
[
"email",
{},
"text",
""
]
]
]
}
]
}
],
"events": [
{
"eventAction": "registration",
"eventDate": "1995-08-14T04:00:00Z"
},
{
"eventAction": "expiration",
"eventDate": "2025-08-13T04:00:00Z"
},
{
"eventAction": "last changed",
"eventDate": "2024-08-14T07:01:34Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2024-11-25T21:05:46Z"
}
],
"secureDNS": {
"delegationSigned": true,
"dsData": [
{
"keyTag": 370,
"algorithm": 13,
"digestType": 2,
"digest": "BE74359954660069D5C63D200C39F5603827D7DD02B56F120EE9F3A86764247C"
}
]
},
"nameservers": [
{
"objectClassName": "nameserver",
"ldhName": "A.IANA-SERVERS.NET"
},
{
"objectClassName": "nameserver",
"ldhName": "B.IANA-SERVERS.NET"
}
],
"rdapConformance": [
"rdap_level_0",
"icann_rdap_technical_implementation_guide_0",
"icann_rdap_response_profile_0"
],
"notices": [
{
"title": "Terms of Use",
"description": [
"Service subject to Terms of Use."
],
"links": [
{
"href": "https://www.verisign.com/domain-names/registration-data-access-protocol/terms-service/index.xhtml",
"type": "text/html"
}
]
},
{
"title": "Status Codes",
"description": [
"For more information on domain status codes, please visit https://icann.org/epp"
],
"links": [
{
"href": "https://icann.org/epp",
"type": "text/html"
}
]
},
{
"title": "RDDS Inaccuracy Complaint Form",
"description": [
"URL of the ICANN RDDS Inaccuracy Complaint Form: https://icann.org/wicf"
],
"links": [
{
"href": "https://icann.org/wicf",
"type": "text/html"
}
]
}
]
}

type: array<object> Optional

Historical DNS observations collected from passive sources. Each object represents a single observation.

Properties:

  • rrtype (string): Record type, e.g., A, AAAA, NS, MX, TXT, CNAME
  • rrname (string): Observed value (for A/AAAA this is the IP; for NS/MX/TXT/CNAME the record value)
  • rdata (string): Queried domain
  • time_first (integer): First seen epoch seconds
  • time_last (integer): Last seen epoch seconds
  • count (integer): Number of observations
[
{ "rrtype": "A", "rrname": "142.250.186.110", "rdata": "google.com", "time_first": 1710538717, "time_last": 1758559359, "count": 3390 },
{ "rrtype": "AAAA", "rrname": "2a00:1450:4001:810::200e", "rdata": "google.com", "time_first": 1697028644, "time_last": 1755038173, "count": 2067 },
{ "rrtype": "CNAME", "rrname": "www.forwhenidle.com", "rdata": "google.com", "time_first": 1717877150, "time_last": 1746799577, "count": 5 }
]

type: object Optional

Passive TLS subjects and certificate hashes observed, keyed by IP address.

Properties per IP:

  • certificates (string[]): Certificate SHA-1/SHA-256 hashes
  • subjects (string[]): Certificate subjects (usually hostnames)
{
"172.217.17.110": {
"certificates": [
"ef3d5b04f51d97a3cded293584af6221d5d0c262",
"d99417c4d7aa394595afbe90ee515f4cd0106590"
],
"subjects": ["google.com"]
}
}

The following is a JSON schema representation of the JSON export produced by Have I Benn Squatted.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string"
},
"permutation": {
"type": "string",
"enum": [
"Addition",
"Bitsquatting",
"DoubleVowelInsertion",
"Homoglyph",
"Hyphenation",
"Insertion",
"Keyword",
"Mapped",
"Omission",
"Repetition",
"Replacement",
"Subdomain",
"Tld",
"Transposition",
"VowelSwap"
]
},
"distance": {
"type": "integer"
},
"ips": {
"type": "object",
"properties": {
"ip": {
"type": "string"
},
"asn": {
"type": "object",
"properties": {
"number": {
"type": "integer"
},
"organization": {
"type": "string"
}
}
},
"country": {
"type": "object",
"properties": {
"continent": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"pattern": "^[A-Z]{2}$"
},
"iso_code": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"pattern": "^[A-Z]{2}$"
}
}
}
}
},
"whois": {
"oneOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"classification": {
"type": "object",
"properties": {
"legitimate": {
"type": "number"
},
"parked": {
"type": "number"
},
"phishing": {
"type": "number"
}
},
"required": ["legitimate", "parked", "phishing"]
},
"httpBanner": {
"type": "string"
},
"screenshot": {
"type": "string"
},
"simhashDistance": {
"type": "integer"
}
},
"required": ["domain", "permutation"]
}
}

The following are a few examples of how you can use the Have I Been Squatted JSON output data with jq.

Extract a list of all domains.

Terminal window
jq '.[].domain' example.com-lookup.json

Extract each IP address and its corresponding ASN number.

Terminal window
jq '.[] | .ips[] | {ip: .ip, asn: .asn.number}' example.com-lookup.json

Find domains classified as likely phishing

Section titled “Find domains classified as likely phishing”

Filter domains with a phishing score above 0.6.

Terminal window
jq '.[] | select(.classification.phishing > 0.6) | .domain' example.com-lookup.json

Retrieve the classification scores for each domain, filtering out any results without classification information.

Terminal window
jq '.[] | select(.classification != null) | {domain: .domain, classification: .classification}' example.com-lookup.json

These code examples parse the Have I Been Squatted JSON output data describing typosquatted domain analysis results, converts the JSON string into structured data and prints the resulting data structure.

from dataclasses import dataclass, field
from typing import Dict, Optional, List, Union
import json
@dataclass
class ASN:
number: int
organization: str
@dataclass
class Country:
continent: str
iso_code: str
@dataclass
class IP:
ip: str
asn: ASN
country: Country
@dataclass
class Classification:
legitimate: float
parked: float
phishing: float
@dataclass
class Record:
domain: str
permutation: str
distance: Optional[int] = None
ips: Optional[Dict[str, IP]] = field(default_factory=dict)
whois: Optional[Union[str, dict]] = None
classification: Optional[Classification] = None
httpBanner: Optional[str] = None
screenshot: Optional[str] = None
simhashDistance: Optional[int] = None
def main():
output = """
[
{
"domain": "example.com",
"permutation": "Homoglyph",
"distance": 1,
"ips": {
"192.0.2.1": {
"ip": "192.0.2.1",
"asn": {
"number": 64500,
"organization": "EXAMPLE-ORG"
},
"country": {
"continent": "NA",
"iso_code": "US"
}
}
},
"whois": {
"rdapConformance": [
"rdap_level_0"
]
},
"classification": {
"legitimate": 0.95,
"parked": 0.05,
"phishing": 0.0
},
"httpBanner": "Apache/2.4.41 (Unix)",
"screenshot": "https://screenshots.haveibeensquatted.com/1234567890",
"simhashDistance": 42
}
]
"""
data = json.loads(output)
records = [
Record(
domain=item["domain"],
permutation=item["permutation"],
distance=item.get("distance"),
ips=(
{
key: IP(
ip=value["ip"],
asn=ASN(**value["asn"]),
country=Country(**value["country"]),
)
for key, value in item.get("ips", {}).items()
}
if "ips" in item
else {}
),
whois=item.get("whois"),
classification=(
Classification(**item["classification"])
if "classification" in item
else None
),
httpBanner=item.get("httpBanner"),
screenshot=item.get("screenshot"),
simhashDistance=item.get("simhashDistance")
)
for item in data
]
for record in records:
print(record)