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
brian
Senior Member
****

Avatar

Posts: 819
Reputation: 43
– / Male / –
Joined: Sep 2004
RE: Xniff help
I'm not sure and I haven't really done any MP! scripting but shouldn't all these loading lines be in the OnEvent_Initialize(MessengerStart) function so that they will be executed once MSN/WLM starts?
12-10-2006 12:51 AM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: Xniff help
quote:
Originally posted by brian
I'm not sure and I haven't really done any MP! scripting but shouldn't all these loading lines be in the OnEvent_Initialize(MessengerStart) function so that they will be executed once MSN/WLM starts?

Thats not how it works. :p Make sure you have the file in the right folder and that it is registered when the script pack is imported
<Eljay> "Problems encountered: shit blew up" :zippy:
12-10-2006 05:03 AM
Profile PM Find Quote Report
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
O.P. RE: Xniff help
it did not come as a script pack either but i do have the component in the ame directory as this
12-10-2006 10:52 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: Xniff help
You may need to register the Xniff.ocx file then using Regsvr32 (there are many guides for doing this on the internet and possibly a few on the forum somewhere)
<Eljay> "Problems encountered: shit blew up" :zippy:
12-10-2006 01:01 PM
Profile PM Find Quote Report
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
O.P. RE: Xniff help
its registered but still the same problems
12-10-2006 04:08 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Xniff help
As the error states, it is on the first line:

var xniff = new ActiveXObject( "w00t.Xniff" );

The only thing which can be wrong with it is that the ActiveX is _not_ properly registered.

Locate the Xniff ActiveX ocx and then register it using regsvr32 as SpunkyLoveMuff said.

regsvr32 "C:\path_to_xniff\xniff.ocx"


PS:
quote:
Originally posted by SpunkyLoveMuff
Make sure you have the file in the right folder
It does not matter where ActiveX DLLs or OCXs are located. Partially the point in them needing to be registered is that they can be located elsewhere. Registering such an ActiveX adds an entry in the registry to the location of the ActiveX. So it can well be located anywhere on your hard disk, it doesn't need to be in the same directory as the program it uses.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-11-2006 02:22 AM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: Xniff help
I meant more specifically in the right folder (as in not a subfolder) within the script package as it wouldn't register it when it was imported and it would need to be a slightly different path to register the fil by regsvr32
<Eljay> "Problems encountered: shit blew up" :zippy:
12-11-2006 03:20 AM
Profile PM Find Quote Report
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
O.P. RE: Xniff help
no it is registered fine if you hadn't read on
12-11-2006 06:41 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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