What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Xniff help

Xniff help
Author: Message:
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
O.P. Xniff help
I haven't used this in a while but the example packet sniffer has stopped working. I have downloaded it again but still no luck.
code:
var xniff = new ActiveXObject( "w00t.Xniff" );  // create the activexobject
xniff.IP = getLocalIp(); // assign your last local IP address, automatically detected (if you want to force a specific ip to listen to, just set it as a string 'XXX.XXX.XXX.XXX')
xniff.Start();  //start monitoring

var etc = function(){ // jscript tricks
                function xniff::OnData  (srcip,srcport,destip,destport,data,datalen){ // event raised by the activexobject when data is available, arguments are obvious i think
                  if (srcport == '1863') if (datalen > 0) // incoming from port 1863 (msn server)
                     Debug.Trace('« (' + datalen + ') ' + data); // show in in the debug window
                 
                  if (destport == '1863') if (datalen > 0) // outcoing packet to msn server
                     Debug.Trace('» (' + datalen + ') ' + data); // show again
                 
               
                }
}

etc();

function getLocalIp(){ //retrieves your local ip. if there is more than one, the last one is used. thanks Plik for the function
    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;
}

function OnEvent_Initialize(MessengerStart){}
function OnEvent_Uninitialize(MessengerExit){xniff.Stop();}

Error:
code:
Script is starting
Error: unknown.
       Line: 1. Code: -2147024770.
Script has failed to start
any help would be great
12-10-2006 12:15 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Xniff help - by effection on 12-10-2006 at 12:15 AM
RE: Xniff help - by brian on 12-10-2006 at 12:51 AM
RE: Xniff help - by Spunky on 12-10-2006 at 05:03 AM
RE: Xniff help - by effection on 12-10-2006 at 10:52 AM
RE: Xniff help - by Spunky on 12-10-2006 at 01:01 PM
RE: Xniff help - by effection on 12-10-2006 at 04:08 PM
RE: Xniff help - by CookieRevised on 12-11-2006 at 02:22 AM
RE: Xniff help - by Spunky on 12-11-2006 at 03:20 AM
RE: Xniff help - by effection on 12-11-2006 at 06:41 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On