fix netstat -6 output and check for tty

Signed-off-by: Lehner Florian <dev@der-flo.net>