XPcap is a scriptable application allowing you to dump network packets on one of your network interface. It can help you to see what is going on, analyze a protocol, debug network applications and many more things :)
Before launching the application you should change the permissions on the following file : /dev/bpf0
> chmod 777 /dev/bpf0
Then launch Smile and compile the following handler :
on notify theRcpt from thesrc with data thedata
quietmsg(thedata)
smilepause 0.01
end notifyThen you can start playing with XPcap from an AppleScript Terminal :
tell application "XPcap" to analyze network interface "en1"
-- monitor outgoing traffic on port 110 (POP3)
tell application "XPcap" to register filter "dst port 110"
tell application "XPcap" to start analyzing
tell application "XPcap" to stop analyzingOnce done, do not forget to change the permissions back :
>chmod 700 /dev/bpf0