syspy  0.1
syspy windows system information tool with python
test.py
Go to the documentation of this file.
1 from network import Network
2 
3 nw = Network()
4 
6  """
7  Bytes Sent: 11.6M
8  Bytes Recv: 191.0M
9  Packets Sent: 104.9K
10  Packets Recv: 163.7K
11  Errin: 0B
12  Errour: 0B
13  Dropin: 0B
14  Dropout: 0B
15  """
16  a,b,c,d,e,f,g,h = nw.getNetIoCounters()
17 
18  print("Bytes Sent: {}\nBytes Recv: {}\nPackets Sent: {}\nPackets Recv: {}" \
19  "\nErrin: {}\nErrour: {}\nDropin: {}\nDropout: {}".format(a,b,c,d,e,f,g,h))
20 
21 
23  """
24  Proto Local address Remote address Status PID Program name
25  tcp 0.0.0.0:135 - LISTEN 800 ?
26  tcp 192.168.2.94:139 - LISTEN 4 System
27  tcp 0.0.0.0:1025 - LISTEN 488 ?
28  tcp 0.0.0.0:1026 - LISTEN 932 ?
29  tcp 0.0.0.0:1027 - LISTEN 1076 ?
30  tcp 0.0.0.0:1028 - LISTEN 568 ?
31  tcp 0.0.0.0:1029 - LISTEN 544 ?
32  tcp 192.168.2.94:3291 192.30.252.86:443 ESTABLISHED 3728 chrome.exe
33  """
34  nw.getNetConnections()
35 
36 #netIoCounters()
37 #netConnections()
def netIoCounters()
Definition: test.py:5
def netConnections()
Definition: test.py:22