python package that provide networks informations in json/dict format
- network device name
- mac addr, ip addr, mask, network addr
- status
- statistics
- ifindex, iflink
- routing table
- tcp and tcpv6 connexions
- udp and udpv6 connexions
- ...
This script is compatible with Linux OS
The script read the '/sys/class/net/' recursively (partialy) and store the collected information in Dict and return the result that can be exploited like json file.
pip install ifaceinfo
or clone the github repository and work directly with
from ifaceinfo import InterfacesInfos
from ifaceroutes import InterfacesRoutes
from ifaceroutes import TCPConn
from ifaceroutes import UDPConn
ifaces = InterfacesInfos()
ifacesroutes = InterfacesRoutes()
tcpconn = TCPConn()
udpconn = UDPConn()