tcpdump -A -s 10240 'tcp port 8080' \ | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[0-9][0-9]:[0-9][0-9]|^[A-Za-z0-9-]+: " \ | sed -r 's/^........(GET |HTTP\/|POST |HEAD )/\1/g; s/^([0-9:\.]*) IP .*/\n\1/g'
tcpdump -A -s 10240 'tcp port 8080' \ | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[0-9][0-9]:[0-9][0-9]|^[A-Za-z0-9-]+: " \ | sed -r 's/^........(GET |HTTP\/|POST |HEAD )/\1/g; s/^([0-9:\.]*) IP .*/\n\1/g'
I installed tsocks on OSX through macport and it kept reporting “Segmentation fault: 11” for whatever command I issue, later on turned out I need to put “tordns_enable = false” in tsocks.conf to solve the problem.
Don’t know why, and I told myself – don’t dig into things that don’t matter your core business, hehe.