WiFi Pineapple Python Network Helpers
Table of contents
Introduction
Python API
Functions
def check_for_internet(url: str = 'https://downloads.hak5.org/internet', timout: int = 10, logger: Optional[Logger] = None) -> bool
If the connection fails to establish or times out then assume there is not internet. Run a command and pipe it to grep for some output.
Parameters
- url: The url to attempt to connect to. Default is https://downloads.hak5.org/internet.
- timeout: The amount of time in seconds to wait before giving up. Default is 10.
- logger: An optional instance of Logger use to log any exceptions while trying to establish a connection.
Returns
- bool: True if there is an internet connection, False if there is not.
def get_interfaces() -> List[str]
Returns
- List[str]: A list of network interfaces available on the device.