### Example API response Source: https://github.com/krmaxwell/spyonweb/blob/master/README.md The expected JSON structure returned by the summary method. ```json { "status": "found", "result": { "summary": { "fullmooncalendar.net": { "items": { "adsense": { // Format: "adsense_code": number_of_domains "pub-5953444431482912": 10, "pub-8423794689684356": 36 }, "analytics": { // Format: "analytics_code": number_of_domains "UA-15207196": 31, "UA-34505845": 9 }, "dns_servers": { // Format: "nameserver": number_of_domains "erdomain.earth.orderbox-dns.com": 470, "erdomain.mars.orderbox-dns.com": 470, "erdomain.mercury.orderbox-dns.com": 469, "erdomain.venus.orderbox-dns.com": 469 }, "ip": { // Format: "ip_address": number_of_domains "209.40.194.244": 9 } } } } } } ``` -------------------------------- ### Initialize and use spyonweb Source: https://github.com/krmaxwell/spyonweb/blob/master/README.md Initialize the client with an API token and perform a summary request for a specific domain. ```python import spyonweb s = spyonweb.spyonweb(token=MY_TOKEN) test_domain = "fullmooncalendar.net" s.summary(test_domain) ``` -------------------------------- ### Initialize Spyonweb Client Source: https://context7.com/krmaxwell/spyonweb/llms.txt Instantiate the Spyonweb class using an API token. A custom API URL can be provided for testing or alternative endpoints. ```python from spyonweb.spyonweb import Spyonweb # Initialize with your API token s = Spyonweb(token="your-api-token-here") # Or specify a custom API URL s = Spyonweb(token="your-api-token-here", url="https://custom-api.example.com/v1/") ``` -------------------------------- ### Command-Line Interface Source: https://context7.com/krmaxwell/spyonweb/llms.txt Provides a command-line interface for quick lookups without writing Python code. API token can be set via environment variable. ```APIDOC ## Command-Line Interface ### Description The library includes a CLI for quick lookups without writing Python code. Set your API token via the `SPYONWEB_API` environment variable and use the various command flags. ### Usage ```bash export SPYONWEB_API="your-api-token-here" python -m spyonweb.spyonweb [OPTIONS] [ARGS]... ``` ### Options - `-s`, `--summary `: Get summary for a domain. - `-d`, `--domain `: Get detailed domain information. - `-a`, `--analytics `: Lookup domains by Google Analytics ID. - `-e`, `--adsense `: Lookup domains by Google Adsense publisher ID. - `-i`, `--ip `: Find domains on an IP address. - `-n`, `--nameserver `: Find domains using a nameserver. - `-p`, `--ip_dns `: Find nameservers on an IP address. ### Examples ```bash # Get summary for a domain python -m spyonweb.spyonweb -s example.com # Lookup domains by Google Analytics ID python -m spyonweb.spyonweb -a UA-15207196 # Find domains on an IP address python -m spyonweb.spyonweb -i 209.40.194.244 ``` ``` -------------------------------- ### Execute Spyonweb CLI commands Source: https://context7.com/krmaxwell/spyonweb/llms.txt Demonstrates various command-line flags for performing lookups without writing Python code. Requires the SPYONWEB_API environment variable. ```bash # Set API token export SPYONWEB_API="your-api-token-here" # Get summary for a domain python -m spyonweb.spyonweb -s example.com # Get detailed domain information python -m spyonweb.spyonweb -d example.com # Lookup domains by Google Analytics ID python -m spyonweb.spyonweb -a UA-15207196 # Lookup domains by Google Adsense publisher ID python -m spyonweb.spyonweb -e pub-5953444431482912 # Find domains on an IP address python -m spyonweb.spyonweb -i 209.40.194.244 # Find domains using a nameserver python -m spyonweb.spyonweb -n ns1.example.com # Find nameservers on an IP address python -m spyonweb.spyonweb -p 192.168.1.1 ``` -------------------------------- ### Configure Maltego integration server Source: https://context7.com/krmaxwell/spyonweb/llms.txt Outlines the REST endpoints provided by the Bottle-based server for Maltego transforms. ```python # The server exposes these REST endpoints for Maltego transforms: # POST /summary - Domain summary transform # POST /domain - Domain detail transform # POST /adsense - Adsense lookup transform # POST /analytics - Analytics lookup transform # POST /ip - IP address lookup transform # POST /dns_domain - Nameserver domain lookup transform # POST /ip_dns - IP nameserver lookup transform # Start the Maltego transform server # Set PORT environment variable or defaults to 5000 # python server.py # The server validates input types: # - Domains: Must match valid hostname regex # - IP addresses: Must match valid IPv4 regex # - Adsense codes: Must match pattern "pub-[0-9]+" # - Analytics codes: Must match pattern "UA-[0-9]+" ``` -------------------------------- ### Retrieve domains by nameserver Source: https://context7.com/krmaxwell/spyonweb/llms.txt Uses the dns_domain() method to list all domains associated with a specific nameserver. ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") # Find all domains using a specific nameserver nameserver = "erdomain.earth.orderbox-dns.com" results = s.dns_domain(nameserver) # Process the nameserver lookup results if results: print(f"Domains using {nameserver}:") for domain, date in results.items(): print(f" {domain}: {date}") # Limit results for popular nameservers limited_results = s.dns_domain(nameserver, limit=200) ``` -------------------------------- ### Discover domains by IP address Source: https://context7.com/krmaxwell/spyonweb/llms.txt Uses the ipaddress() method to identify domains hosted on a specific IP address. ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") # Find all domains hosted on an IP address ip = "209.40.194.244" results = s.ipaddress(ip) # Results contain domain names and association dates if results: print(f"Domains hosted on {ip}:") for domain, date in results.items(): print(f" {domain} (since {date})") # Limit results for large IP blocks limited_results = s.ipaddress(ip, limit=100) ``` -------------------------------- ### Find nameservers on an IP address Source: https://context7.com/krmaxwell/spyonweb/llms.txt Uses the ip_dns() method to identify nameservers hosted on a specific IP address. ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") # Find nameservers hosted on an IP address ip = "192.168.1.1" results = s.ip_dns(ip) # Results contain nameserver names and association dates if results: print(f"Nameservers on {ip}:") for nameserver, date in results.items(): print(f" {nameserver}: {date}") ``` -------------------------------- ### Summary API Source: https://context7.com/krmaxwell/spyonweb/llms.txt Retrieves a comprehensive overview of a domain, showing the count of related domains sharing the same identifiers. ```APIDOC ## GET /summary ### Description Retrieves a summary of shared identifiers for a given domain, including counts for Adsense, Analytics, DNS servers, and IP addresses. ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name to query. ### Response #### Success Response (200) - **status** (string) - Status of the request (e.g., "found"). - **result** (object) - Contains the summary data for the requested domain. ``` -------------------------------- ### Maltego Integration Source: https://context7.com/krmaxwell/spyonweb/llms.txt Provides Maltego transform endpoints via a Bottle-based web server for integration with the Maltego link analysis platform. ```APIDOC ## Maltego Integration ### Description The library includes a Bottle-based web server that provides Maltego transform endpoints for integration with the Maltego link analysis platform. This enables visual investigation workflows. ### Server Endpoints - `POST /summary`: Domain summary transform. - `POST /domain`: Domain detail transform. - `POST /adsense`: Adsense lookup transform. - `POST /analytics`: Analytics lookup transform. - `POST /ip`: IP address lookup transform. - `POST /dns_domain`: Nameserver domain lookup transform. - `POST /ip_dns`: IP nameserver lookup transform. ### Starting the Server Set the `PORT` environment variable or it defaults to 5000. ```bash python server.py ``` ### Input Validation The server validates input types: - Domains: Must match valid hostname regex. - IP addresses: Must match valid IPv4 regex. - Adsense codes: Must match pattern `pub-[0-9]+`. - Analytics codes: Must match pattern `UA-[0-9]+`. ``` -------------------------------- ### Domains on Nameserver API Source: https://context7.com/krmaxwell/spyonweb/llms.txt Retrieves all domains handled by a specific nameserver. This reveals domain portfolios managed through the same DNS infrastructure. ```APIDOC ## Domains on Nameserver API ### Description Retrieves all domains handled by a specific nameserver. This reveals domain portfolios managed through the same DNS infrastructure. ### Method GET (Implicit, via library method call) ### Endpoint Not directly exposed as a REST endpoint in this context, but the `dns_domain()` method is used. ### Parameters #### Query Parameters - **nameserver** (string) - Required - The nameserver to query (e.g., "erdomain.earth.orderbox-dns.com"). - **limit** (integer) - Optional - Limits the number of results returned. ### Request Example ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") results = s.dns_domain("erdomain.earth.orderbox-dns.com", limit=200) ``` ### Response #### Success Response (200) An OrderedDict where keys are domain names and values are the dates they started using the specified nameserver. #### Response Example ```json { "example": "OrderedDict([('example1.com', '2021-11-01'), ('example2.com', '2021-12-05')])" } ``` ``` -------------------------------- ### Retrieve Domain Summary Source: https://context7.com/krmaxwell/spyonweb/llms.txt Use the summary method to obtain counts of related domains sharing identifiers. The response includes nested dictionaries for adsense, analytics, dns_servers, and ip. ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") result = s.summary("fullmooncalendar.net") # Example response structure: # { # "status": "found", # "result": { # "summary": { # "fullmooncalendar.net": { # "items": { # "adsense": { # "pub-5953444431482912": 10, # "pub-8423794689684356": 36 # }, # "analytics": { # "UA-15207196": 31, # "UA-34505845": 9 # }, # "dns_servers": { # "erdomain.earth.orderbox-dns.com": 470, # "erdomain.mars.orderbox-dns.com": 470 # }, # "ip": { # "209.40.194.244": 9 # } # } # } # } # } # } # Check if domain was found and process identifiers if result['status'] == 'found': domain_data = result['result']['summary']['fullmooncalendar.net']['items'] # Get Adsense codes and their domain counts for adsense_code, domain_count in domain_data.get('adsense', {}).items(): print(f"Adsense {adsense_code}: {domain_count} related domains") # Get Analytics codes for analytics_code, domain_count in domain_data.get('analytics', {}).items(): print(f"Analytics {analytics_code}: {domain_count} related domains") ``` -------------------------------- ### Domain API Source: https://context7.com/krmaxwell/spyonweb/llms.txt Returns detailed information about a specific domain, including lists of domains sharing the same identifiers. ```APIDOC ## GET /domain ### Description Returns detailed information about a specific domain, providing the actual domain names that share identifiers rather than just counts. ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name to query. ### Response #### Success Response (200) - **status** (string) - Status of the request. - **result** (object) - Contains detailed items including adsense, analytics, ip, and dns_servers. ``` -------------------------------- ### IP Address API Source: https://context7.com/krmaxwell/spyonweb/llms.txt Discovers all domains hosted on a specific IP address. This is useful for identifying co-hosted websites which may indicate shared ownership or infrastructure. ```APIDOC ## IP Address API ### Description Discovers all domains hosted on a specific IP address. This is useful for identifying co-hosted websites which may indicate shared ownership or infrastructure. ### Method GET (Implicit, via library method call) ### Endpoint Not directly exposed as a REST endpoint in this context, but the `ipaddress()` method is used. ### Parameters #### Query Parameters - **ip** (string) - Required - The IP address to query (e.g., "209.40.194.244"). - **limit** (integer) - Optional - Limits the number of results returned. ### Request Example ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") results = s.ipaddress("209.40.194.244", limit=100) ``` ### Response #### Success Response (200) An OrderedDict where keys are domain names and values are the dates they were first associated with the IP address. #### Response Example ```json { "example": "OrderedDict([('example1.com', '2022-05-10'), ('example2.com', '2022-06-20')])" } ``` ``` -------------------------------- ### Nameservers on IP Address API Source: https://context7.com/krmaxwell/spyonweb/llms.txt Finds all nameservers hosted on a specific IP address. This helps identify DNS infrastructure relationships and potential shared hosting patterns. ```APIDOC ## Nameservers on IP Address API ### Description Finds all nameservers hosted on a specific IP address. This helps identify DNS infrastructure relationships and potential shared hosting patterns. ### Method GET (Implicit, via library method call) ### Endpoint Not directly exposed as a REST endpoint in this context, but the `ip_dns()` method is used. ### Parameters #### Query Parameters - **ip** (string) - Required - The IP address to query (e.g., "192.168.1.1"). ### Request Example ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") results = s.ip_dns("192.168.1.1") ``` ### Response #### Success Response (200) An OrderedDict where keys are nameserver hostnames and values are the dates they were associated with the IP address. #### Response Example ```json { "example": "OrderedDict([('ns1.example.com', '2023-02-10'), ('ns2.example.com', '2023-03-15')])" } ``` ``` -------------------------------- ### Perform Detailed Domain Lookup Source: https://context7.com/krmaxwell/spyonweb/llms.txt The domain method returns specific domain names associated with shared identifiers rather than just counts. ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") result = s.domain("example.com") # Process the domain lookup results if result['status'] == 'found': domain_info = result['result']['domain']['example.com']['items'] # Access shared Adsense identifiers adsense_data = domain_info.get('adsense', {}) print(f"Adsense codes: {list(adsense_data.keys())}") # Access shared Analytics identifiers analytics_data = domain_info.get('analytics', {}) print(f"Analytics codes: {list(analytics_data.keys())}") # Access IP address information ip_data = domain_info.get('ip', {}) print(f"IP addresses: {list(ip_data.keys())}") # Access nameserver information dns_data = domain_info.get('dns_servers', {}) print(f"Nameservers: {list(dns_data.keys())}") ``` -------------------------------- ### Retrieve domains by Google Analytics ID Source: https://context7.com/krmaxwell/spyonweb/llms.txt Uses the analytics() method to find domains sharing a specific tracking ID. Results are returned as an OrderedDict. ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") # Find domains using a specific Analytics tracking ID analytics_code = "UA-15207196" results = s.analytics(analytics_code) # Process results - returns OrderedDict of {domain: date} if results: print(f"Found {len(results)} domains using {analytics_code}") for domain, date_associated in results.items(): print(f" {domain}: {date_associated}") # Limit to first 50 results limited_results = s.analytics(analytics_code, limit=50) ``` -------------------------------- ### Query Domains by Adsense ID Source: https://context7.com/krmaxwell/spyonweb/llms.txt The adsense method retrieves domains associated with a specific publisher ID, returning an OrderedDict mapping domains to their association dates. ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") # Find domains using a specific Adsense publisher ID adsense_code = "pub-5953444431482912" results = s.adsense(adsense_code) # Results are returned as an OrderedDict: {domain: date} if results: for domain, date_associated in results.items(): print(f"{domain} - associated since {date_associated}") else: print("No domains found for this Adsense code") # Limit results to a specific number limited_results = s.adsense(adsense_code, limit=10) ``` -------------------------------- ### Google Adsense API Source: https://context7.com/krmaxwell/spyonweb/llms.txt Finds all domains using a specific Google Adsense publisher ID. ```APIDOC ## GET /adsense ### Description Finds all domains associated with a specific Google Adsense publisher ID. ### Parameters #### Query Parameters - **adsense_code** (string) - Required - The publisher ID to search for. - **limit** (integer) - Optional - The maximum number of results to return. ### Response #### Success Response (200) - **results** (OrderedDict) - A mapping of domain names to the date they were associated with the identifier. ``` -------------------------------- ### Google Analytics API Source: https://context7.com/krmaxwell/spyonweb/llms.txt Retrieves all domains using a specific Google Analytics tracking ID. This helps identify websites managed by the same owner or organization through shared analytics implementations. ```APIDOC ## Google Analytics API ### Description Retrieves all domains using a specific Google Analytics tracking ID. This helps identify websites managed by the same owner or organization through shared analytics implementations. ### Method GET (Implicit, via library method call) ### Endpoint Not directly exposed as a REST endpoint in this context, but the `analytics()` method is used. ### Parameters #### Query Parameters - **analytics_code** (string) - Required - The Google Analytics tracking ID (e.g., "UA-15207196"). - **limit** (integer) - Optional - Limits the number of results returned. ### Request Example ```python from spyonweb.spyonweb import Spyonweb s = Spyonweb(token="your-api-token") results = s.analytics("UA-15207196", limit=50) ``` ### Response #### Success Response (200) An OrderedDict where keys are domain names and values are the dates they were associated with the tracking ID. #### Response Example ```json { "example": "OrderedDict([('example1.com', '2023-01-01'), ('example2.com', '2023-01-15')])" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.