What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Release] Xniff (ActiveX Packet Sniffer) - Examples inside

Pages: (6): « First « 1 [ 2 ] 3 4 5 6 » Last »
[Release] Xniff (ActiveX Packet Sniffer) - Examples inside
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Release] Xniff (ActiveX Packet Sniffer)
quote:
Originally posted by Plik
quote:
Originally posted by Pai
I believe
code:
ws = new ActiveXObject( "MSWinsock.Winsock" );
ipaddress = ws.LocalIP;

is easier, but I made it so that the developer can set what IP to listen because there are people with multiple network adapters.
I knew there would be an easyer way envolving winsock -_-

* Plik hides in shame

nah your way is better, MSWinsock.Winsock is a design time activexobject which is only distributed with things like visual studio, so it will only work for people who have this installed (and distributing it is illegal afaik)
07-30-2006 05:32 PM
Profile PM Find Quote Report
Pai
Full Member
***

w00t !

Posts: 203
Reputation: 2
– / Male / –
Joined: Sep 2003
O.P. RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
Yes, you're right, MSWinsock has that issue ! Plik code is much more reliable :) Actually, I used that function in the examples posted.

I've added a couple of full-documented script examples, so you can start there to understand how the ActiveXObject works and study MSN protocol ! If I think of more useful examples to post, I will :p

This post was edited on 07-31-2006 at 12:15 AM by Pai.
07-31-2006 12:14 AM
Profile PM Find Quote Report
nx01rules
Junior Member
**

Avatar
Infinite Diversity

Posts: 42
37 / Male / –
Joined: May 2006
RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
Does it work with polygamy? I mean, if you have two msn's open, and someone opens a window, would it tell both OCX's open for both msn's, or just one?
The fate of destruction is also the joy of rebirth
07-31-2006 03:57 AM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
quote:
Originally posted by Pai
Starting with the whole discussion about window open/close notifiers, with questions to get the contact's font, and some other things people would like to access but can't with the current script engine, I decided to try and create an ActiveX based Packet sniffer.
(y)(y)(y)

quote:
Originally posted by Pai
Examples: (with full commented code)
  • Window open/close notifier (very reliable, only close notifier has a delay of 15/30seconds from the actual close of the window, due to a WLM limitation )

Your packet analyses is wrong (hence it is not reliable at all actually).

The check of 10th item being '0' or nothing to see if the window was openend by the user or by the client itself isn't correct. Same goes for checking the difference between a closed convo due to timeout or not.

When a user opens a window, the 10th item (datatmp[9]) can also be '0'....
Same for closing a window, when the timeout occurs after x seconds the 3rd item (datatmp[2]) isn't always '0', it can be empty too.

quote:
Originally posted by Pai
My first idea was to make the ActiveX MSN-only (only capture MSN packets), but then I thought that only one extra line of code (check if comming from MSN port) wouldn't matter if you could monitor the entire network.
nice idea...

However, since JScript is relative slow it is maybe advisible to also implement an optional port property in the ActiveX object which you can set before starting the trace (maybe even making it a string and accept multiple ports as well like "1863;2433;1234").

Setting this property means that the ActiveX internally would check on the port and you don't have to do that anymore in the (slow) JScript.

If the user doesn't set the port property, then trigger for each and every datapacket, as it is now.

;)


PS: playing with this I noticed several bugs, in the displaytoast function and in the stripformatcodes function of Plus! :(

This post was edited on 07-31-2006 at 07:59 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-31-2006 07:48 AM
Profile PM Find Quote Report
Pai
Full Member
***

w00t !

Posts: 203
Reputation: 2
– / Male / –
Joined: Sep 2003
O.P. RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
@ nx01rules: yeah it does, it just a normal ActiveXObject, like Scripting.FileSystemObject, you can use them the times you want.

@ CookieRevised: thanks, your opinion is always appreciated :)
About the open/close notifier, I based that code on my tests, because when I was seeing all the packets and started WLM with my DP changed, a bunch of contacts opened my window simultaneously, and the 0 was there in the 9th parameter; unlike when a user opened my window really (I tested this with my other PC, opening a convo myself), where the 0 would not appear. As this happened every time, I concluded this would be the correct approach ! Also, I based the BYE checker on the online documentation at msnfanatic, which states that when the server closes a conversation the 0 is appended. As it also happened in my tests, I made it like that !

About the ActiveX based port restriction, I hadn't thought of it but is a good idea, because if even the user doesn't set the port it can continue to use the object normally with the current if (port == XX) in the OnData event!

PS: do you mean bugs in my code ? or the plus functions themselves don't work as intended? I didn't notice it in any of my tests
07-31-2006 10:19 AM
Profile PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
quote:
Note: it's OCX because Delphi doesn't allow to create non-visual ActiveX Object (actually it allows, but it would take forever), so I created it visually and then added the flag to make the ActiveX invisible at runtime. So, don't worry about the extension being OCX and not DLL, just register it normally using regsvr32.



How do i register it???   


i am :stupid:
07-31-2006 12:35 PM
Profile E-Mail PM Find Quote Report
nx01rules
Junior Member
**

Avatar
Infinite Diversity

Posts: 42
37 / Male / –
Joined: May 2006
RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
134jumbodude: Put it in the same directory as the script, then run:

regsvr32 "<path>\Xniff.ocx"

And, i just ran it with two messenger's open - they both reported a window opening when I only opened a window on one account - so theres a bug there. Oh and i am curious, what was the method you used to determine which MSN is receiving the BYE packet? It doesn't have anything in it but the person who closed the connection, so it must be a TCP based method, yes?
The fate of destruction is also the joy of rebirth
07-31-2006 12:59 PM
Profile PM Web Find Quote Report
Pai
Full Member
***

w00t !

Posts: 203
Reputation: 2
– / Male / –
Joined: Sep 2003
O.P. RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
There isn't a bug, it's just that the ActiveX doesn't distinguish MSN accounts, just packets. So, if you have two messengers, there are two instances of the ActiveX loaded, and both of them receive the packet that was sent and generate the notify. I can't see a method to avoid this, because the ActiveX can't distinguish connections.

I'll try to find something to avoid this, but I can't guarantee :P
07-31-2006 04:40 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
quote:
Originally posted by Pai
@ CookieRevised: thanks, your opinion is always appreciated :)
About the open/close notifier, I based that code on my tests, because when I was seeing all the packets and started WLM with my DP changed, a bunch of contacts opened my window simultaneously, and the 0 was there in the 9th parameter; unlike when a user opened my window really (I tested this with my other PC, opening a convo myself), where the 0 would not appear. As this happened every time, I concluded this would be the correct approach ! Also, I based the BYE checker on the online documentation at msnfanatic, which states that when the server closes a conversation the 0 is appended. As it also happened in my tests, I made it like that !

cool... but those tests are unfortunatly inconclusive and apparently wrong, seeing my own tests where there is no clear distinction between when that "0" paramater is added or not...
quote:
Originally posted by Pai
quote:
Originally posted by CookieRevised
PS: playing with this I noticed several bugs, in the displaytoast function and in the stripformatcodes function of Plus! :(

PS: do you mean bugs in my code ? or the plus functions themselves don't work as intended? I didn't notice it in any of my tests
the Plus! functions themselfs.

This post was edited on 08-10-2006 at 01:00 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-10-2006 12:59 AM
Profile PM Find Quote Report
phalanxii
Full Member
***


Posts: 146
Reputation: 5
32 / Male / Flag
Joined: Aug 2006
Status: Away
RE: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
Just a small (amateur) question...

Is there any way to edit the packets before they're sent to the server? Instead of just monitoring the packets, I want to know whether it's possible to hold, edit, then release the edited packet so that xniff::OnData works kind of like OnEvent_ChatWndSendMessage.

Any feedback would be great. :)
08-19-2006 12:47 PM
Profile PM Find Quote Report
Pages: (6): « First « 1 [ 2 ] 3 4 5 6 » Last »
« 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