jBlog

Home page > AppleScript > XPcap > XPcap 0.1.0

XPcap 0.1.0

Tuesday 29 August 2006, by Jean-Baptiste Le Stang

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 notify

Then 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 analyzing

Once done, do not forget to change the permissions back :

>chmod 700 /dev/bpf0

2 Forum messages

Reply to this article

SPIP | template | | Site Map | Follow-up of the site's activity RSS 2.0