Looks really quite usefull
for anyone wondering how to get the local ip so you know what address to sniff:
code:
function getLoaclIp(){
var wmiObj = new ActiveXObject('WbemScripting.SWbemLocator');
var wmiInst = wmiObj.ConnectServer('.', "root\\cimv2");
wmiInst.Security_.ImpersonationLevel = 3;
var col = wmiInst.ExecQuery('Select * from Win32_NetworkAdapterConfiguration');
var colEnum = new Enumerator(col);
var ipAddr;
for (; !colEnum.atEnd(); colEnum.moveNext()){
var objIp = colEnum.item();
var addr = objIp.IPAddress(0);
if((typeof addr == 'string') && addr.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)){
ipAddr = addr;
}
}
return ipAddr;
}
That function returns the last vaild ipaddress of you network adapters.
Im sure there is a better way to find it, but WMI was the only way i could think of at the time