I'm looking to sort and isolate IP from a
tcpdump
live feed.
tcpdump -n -i tun0 "tcp[tcpflags] & (tcp-syn) != 0" | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}
works just fine but when I try to add the uniq
program it fails:
tcpdump -n -i tun0 "tcp[tcpflags] & (tcp-syn) != 0" | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | uniq -u
returns nothing.
Same with sort -u
.
Any idea on how to fix this ?
Asked by ChiseledAbs
(2301 rep)
Jul 8, 2016, 10:29 AM
Last activity: Jul 26, 2024, 05:54 AM
Last activity: Jul 26, 2024, 05:54 AM