Browse Source

v0.76/si
- only IPv4 corr.

Peter Siegrist 5 years ago
parent
commit
02c8f2de63
1 changed files with 2 additions and 2 deletions
  1. 2 2
      sisniff.py

+ 2 - 2
sisniff.py

@@ -14,7 +14,7 @@ import struct
 import commands
 import argparse
 
-VERSION = "0.75"
+VERSION = "0.76"
 
 PROC_TCP4 = "/proc/net/tcp"
 PROC_UDP4 = "/proc/net/udp"
@@ -372,7 +372,7 @@ if args.filter:
     print "> Applying Filter: \"ip" + fillter + "\"" 
 
 # local addresses 
-MYADDRS = _remove_empty(commands.getoutput("hostname -I").split(' '))
+MYADDRS = _remove_empty([os.popen('ip addr show '+iface).read().split("inet ")[1].split("/")[0]])
 MYADDRS.append('0.0.0.0')
 MYADDRS.append('127.0.0.1')
 xMYADDRS = [_ip_hexrev(x) for x in MYADDRS]