teatime package

Submodules

teatime.utils module

This module contains various utility functions around scanning.

teatime.utils.check_port(host: str, port: int, timeout: int = 2) → bool[source]

Check whether a given port is available on the target host.

This helper function will attempt to connect to a given port on the target host.

Parameters:
  • timeout – Number of seconds to time out after
  • host – The target host to connect to
  • port – The target port to connect to
Returns:

A boolean indicating whether the connection was successful

teatime.utils.reverse_dns(address: str) → str[source]

Attempt to resolve an IP address to its DNS name.

Parameters:address – The IP address to resolve
Returns:The IP’s DNS name as a string

Module contents

Let’s toast some nodes, eh?