Telepath API

class synmods.nettools.service.NetToolsApi

Bases: StormSvc, CellApi

A Telepath API for the NetTools service.

Notes

Where the method references returning a results dictionary, it has the following keys:

success

True or False, whether the operation was successful.

result

Dict to be ingested or None if error encountered.

mesg

String containing error details or empty if successful.

async getFqdnDns(name, dnstypes='A')

Gather live DNS data about an FQDN.

Parameters:
  • name (str) – FQDN to query.

  • dnstypes (str or iterable) – A DNS record type or list of types. Types: A,AAAA,NS,MX,TXT,CNAME.

Yields:

tuple – Of (message type, data, info) where message types are one of (data, warn, debug)

async getFqdnDnsBrute(name, dnstypes='A', prefixes=None)

Gather live DNS data for subdomains of the FQDN specified by prefixes.

Parameters:
  • name (str) – Base FQDN to query subdomains for

  • dnstypes (str or iterable) – A DNS record type or list of types. Types: A,AAAA,NS,MX,TXT,CNAME.

  • prefixes (None or iterable) – List of subdomain prefixes, or use default if None.

Yields:

tuple – Of (message type, data, info) where message types are one of (data, warn, debug)

async getFqdnDnsWild(name)

Check the input FQDN for DNS wildcards.

Parameters:

name (str) – FQDN to query.

Yields:

tuple – Of (message type, data, info) where message types are one of (data, warn, debug)

async getFqdnVariants(name, opts=None)

Lookup variants (e.g. typos, etc) of the input FQDN, yielding only the nodes that were in DNS

Parameters:
  • name (str) – Base FQDN to query variants for

  • opts (dict or None) – Optional dict supporting the following arguments “jobs” (int): Number of parallel workers to run “dict” (list): Language codes for built-in dictionaries

Yields:

tuple – Of (message type, data, info) where message types are one of (data, warn, debug)

async getFqdnWhois(fqdn, timeout=30)

Gather live whois data about an FQDN.

Parameters:
  • fqdn (str) – FQDN to query.

  • timeout (int) – Specify API request timeout in seconds.

Returns:

A dictionary of result information.

Return type:

dict

async getIPDns(ip)

Gather live DNS data about an IP.

Parameters:

ip (str) – IP to query.

Returns:

A dictionary of result information.

Return type:

dict

async getIpWhois(addr, timeout=30)

Gather live whois data about an IPv4 or IPv6 address.

Parameters:
  • addr (str) – IP address to query.

  • timeout (int) – Specify API request timeout in seconds.

Returns:

A dictionary of result information.

Return type:

dict