项目作者: atam84

项目描述 :
Find all network informations, ip mask, address, network, statistics, type, lower and upper devices connexion, tcp/tcp6 connexion, udp and udp6 connexion, routing
高级语言: Python
项目地址: git://github.com/atam84/ifaceinfo.git
创建时间: 2018-04-25T13:11:57Z
项目社区:https://github.com/atam84/ifaceinfo

开源协议:

下载


ifaceinfo

python package that provide networks informations in json/dict format

Documentation Status

Informations are collected:
  • network device name
  • mac addr, ip addr, mask, network addr
  • status
  • statistics
  • ifindex, iflink
  • routing table
  • tcp and tcpv6 connexions
  • udp and udpv6 connexions
  • Take a look to the samples informations collected

  • interfaces
  • routing table
  • tcp connexion
  • udp connexion

Version: 0.1.7, python compatibility: Python 2 and Python 3

compatibility

This script is compatible with Linux OS

how this script work

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.

how to install

  1. pip install ifaceinfo

or clone the github repository and work directly with

how to use the class

  1. from ifaceinfo import InterfacesInfos
  2. from ifaceroutes import InterfacesRoutes
  3. from ifaceroutes import TCPConn
  4. from ifaceroutes import UDPConn
  5. ifaces = InterfacesInfos()
  6. ifacesroutes = InterfacesRoutes()
  7. tcpconn = TCPConn()
  8. udpconn = UDPConn()

class documentations

for more informations about the keyword signification read this:

https://www.kernel.org/doc/Documentation/ABI/testing/