|
|
@ -305,7 +305,7 @@ def get_netstat(): |
|
|
Get ports and applications |
|
|
Get ports and applications |
|
|
""" |
|
|
""" |
|
|
try: |
|
|
try: |
|
|
pipe = os.popen("ss -tnp | grep ESTAB | awk '{print $4, $5}'| sed 's/::ffff://g' | awk -F: '{print $1, $2}' | sort -n | uniq -c") |
|
|
|
|
|
|
|
|
pipe = os.popen("ss -tnp | grep ESTAB | awk '{print $4, $5}'| sed 's/::ffff://g' | awk -F: '{print $1, $2}' | awk 'NF > 0' | sort -n | uniq -c") |
|
|
data = pipe.read().strip().split('\n') |
|
|
data = pipe.read().strip().split('\n') |
|
|
pipe.close() |
|
|
pipe.close() |
|
|
|
|
|
|
|
|
|