I'm unable to get 'get' in terminal using Grep. This code used to work on Lion but in Maverick the GET doesn't show...
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\:\ .*|GET\ \/.*"
Any help or suggestions maybe?
I'm unable to get 'get' in terminal using Grep. This code used to work on Lion but in Maverick the GET doesn't show...
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\:\ .*|GET\ \/.*"
Any help or suggestions maybe?
Copyright © 2021 Jogjafile Inc.
Try:
sudo tcpdump -s 0 -A | egrep --color=never -a -o "Host\: .*|GET\ \/.*"
The
-w -
writes the raw packets whereas the-A
decodes to ASCII; handy for web pages (per man)I found that if grep was outputting color, the Host: lines were output as empty lines.