Small package to probe ip addresses and ports on a local network
Project description
Lanutils
Small package to probe ip addresses and ports on a local network.
Install with:
pip install lanutils
Usage (assuming your local ip is 10.0.0.10 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()
>>> [("10.0.0.10", 24, "Ethernet")]
>>> lanutils.ip_is_alive("10.0.0.10")
>>> True
>>> lanutils.ip_is_alive("10.0.0.11")
>>> False
>>> lanutils.enumerate_devices()
>>> ["10.0.0.7", "10.0.0.10", "10.0.0.133", "10.0.0.187"]
>>> lanutils.port_is_open("10.0.0.10", 8000)
>>> True
>>> lanutils.scan_ports("10.0.0.10", (7990, 8010))
>>> [8000]
>>> lanutils.get_available_port("10.0.0.10", (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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lanutils-1.0.0.tar.gz.
File metadata
- Download URL: lanutils-1.0.0.tar.gz
- Upload date:
- Size: 37.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34561e667aeeec87fda7ba8684056b2af905aeddb3eaaad1ab5a9bb3282567c5
|
|
| MD5 |
29d6df90d57fe902b664c131b2adf396
|
|
| BLAKE2b-256 |
cb28550b4426f32ae5866e4ee59cbb6b0350d43dc823a48610fa3c9404672df2
|
File details
Details for the file lanutils-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lanutils-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cab48c80395329cbf6f72e365018b17421873802609659fdcbedd40a6625a3a
|
|
| MD5 |
6ca4fbbf073e29a1a85aec06fb53f9e0
|
|
| BLAKE2b-256 |
010938ae19a961396ec8751fd67e7eca35ea4e1bd05c1795b2a0b131115a0431
|