Skip to main content

Small package to probe ip addresses and ports on a local network

Project description


Small package to probe ip addresses and ports on a local network.
Install with:

pip install lanutils

Usage (assuming your local ip is with prefix 24, you're connected via ethernet, you have a http server running on port 8000, and there are a few other devices on your network):
>>> import lanutils
>>> lanutils.get_myip()
>>> [("", 24, "Ethernet")]
>>> lanutils.ip_is_alive("")
>>> True
>>> lanutils.ip_is_alive("")
>>> False
>>> lanutils.enumerate_devices()
>>> ["", "", "", ""]
>>> lanutils.port_is_open("", 8000)
>>> True
>>> lanutils.scan_ports("", (7990, 8010))
>>> [8000]
>>> lanutils.get_available_port("", (8000, 8005))
>>> 8001

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lanutils-1.0.0.tar.gz (37.5 kB view hashes)

Uploaded Source

Built Distribution

lanutils-1.0.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page