A network utility library written in Python 3
Project description
Pyphorus
A small network utility library written in Python 3.
Features:
- Port scanner
- UPnP client (SSDP wrapper)
Build with :heart: by
Oleaintueri is sponsoring the development and maintenance of this project within their organisation.
Getting started
Installation
pip install pyphorus
Or
pip install git+https://github.com/Oleaintueri/pyphorus.git
Usage
import pyphorus
if __name__ == "__main__":
phorus = pyphorus.Pyphorus()
devices = phorus.scan_ports("192.168.0.1", ports=[80, 443, 9000], only_open=True)
for device in devices:
print(device.ip, device.port)
# get all devices with ssdp:all
devices = phorus.scan_upnp("upnp:rootdevice")
for device in devices:
print(device.ip, device.friendly_name, device.device_type)
# if you want only the unique ips to remain and are not interested in the ports
unique_devices = pyphorus.utils.strip_duplicate_ips(devices)
Testing
Pyphorus uses nose
to run its tests and mock testing server.
nosetests -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyphorus-0.0.3.tar.gz
(4.4 kB
view hashes)
Built Distribution
pyphorus-0.0.3-py3-none-any.whl
(18.2 kB
view hashes)