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

Pages: (2): « First [ 1 ] 2 » Last »
Port Listening
Author: Message:
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. Port Listening
Hey guys, I'm needing a little bit of help with a minor script. Well, maybe a lot of help, because I honestly dont have a clue, but maybe I can find out if this is at least possible.

I have an xbox, which runs xbmc on my network, and I'm looking to detect a few of the functions froom this. The xbox runs a broadcast function in the background, which sends a UDP datagram whenever an error occurs (among other things).
Basically, I'm looking for a way to listen for this broadcast, and take the information from it, to store in a variable.

I've looked on the xbmc website, and found this information about the function.

The Broadcast facility uses the UDP broadcast protocol with a default port setting of 8278.
XBMC broadcasts on the IP address 255.255.255.255 which is the limited broadcast address.
The actual broadcasts are delimited by <b></b> and may consist of a numerical or textual description of the event (depening on the event)

I've used a small util which lets me see these on Windows, and one of the messages appears as "<b>OnPlayBackStarted;1</b>"
I know how to remove the <b>s etc, but I dont have a clue about the actual listening, or reading information.
Can anyone give me a clue as to whether this is possible, and how it would be done?
Thanks
Stefan Leroux
[Image: adsig.jpg]
10-30-2007 03:28 AM
Profile E-Mail PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: Port Listening
Ill make a .net COM object to listen for the broadcasts later :)
[Image: dt2.0v2.png]      Happy Birthday, WDZ
10-30-2007 05:27 AM
Profile PM Web Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
RE: Port Listening
You're better off making this stuff outside WLM and Plus... you can easily download a network monitor application and watch all the ports and packets..

But if you want to do this and use the information in a script, search for Xniff and read those threads and download some scripts people made (examples).

Have fun!
[Image: signature-user=31&back=4&clr=106,141,166&size=100.png]
10-30-2007 12:52 PM
Profile E-Mail PM Web Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. RE: Port Listening
Thats great cheers.  I'll give Xniff a try, I'm just slightly dubious because I'm on a wireless network, but I'll try, maybe cable it too for testing.

Thanks guys
[Image: adsig.jpg]
10-30-2007 07:14 PM
Profile E-Mail PM Web Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
RE: Port Listening
It works with wireless too!
Have fun!
[Image: signature-user=31&back=4&clr=106,141,166&size=100.png]
10-30-2007 09:13 PM
Profile E-Mail PM Web Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. RE: Port Listening
OK, I've downloaded and registered Xniff.ocx, but I can't get it to detect the packet I'm listening for.  I've used a couple of other programs so I know I'm receiving the infomation to my computer, but theres nothing showing in the debug wheres its meant to show.

I just copied the script from Pai's suggestion, to listen for msn events, and changed the srcport to my desired one, so I'm pretty positive that I have it right, unless I need to do something else because of it being a UDP port.

Anyone have any suggestions for me?
Thanks all
[Image: adsig.jpg]
10-31-2007 01:12 AM
Profile E-Mail PM Web Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
RE: Port Listening
Post your code and we'll see...
Other than that maybe the app isn't actually using the port you think it is... so in that case I'd recommend you either catch all the incoming packets (remove the port == x if clause in your script) or you download a network analyzer to catch all the packets and then you can figure out in which port your stuff is coming in.
Have fun!
[Image: signature-user=31&back=4&clr=106,141,166&size=100.png]
10-31-2007 03:20 AM
Profile E-Mail PM Web Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. RE: Port Listening
OK, I was going to post the code, but I tried listening for all traffic first, and adding srcport into the debug, so now I have it being detected, but it's on port 1028. 
Thing is though, I have the same script running on mIRC, and it definitlely detects on 8278.  I have also run "attacker" (port listener) which says "port 1028 to port 8278".

I'm happy enough with it working, but can anyone explain why its different, or more importantly, if its listening to port 1028, will that stop anything using port 1028 from detecting, or does Xniff allow ports to be reused.
Thanks for all the help anyways Deco.
[Image: adsig.jpg]
10-31-2007 03:17 PM
Profile E-Mail PM Web Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
RE: Port Listening
Well you have both srcport and destport.. which means there's a port from which the packet is sent (from the other end such as the server) and the port in which the packet comes to your computer. So maybe the port you receive the packets is 1028 and the port in which the packet is sent from the server is 8278.

Just guessing what could be happening but it seems to me you have what you wanted.

If you still want something else to happen in your script just keep sending your doubts and we'll see about them.

Have fun!
[Image: signature-user=31&back=4&clr=106,141,166&size=100.png]
10-31-2007 05:45 PM
Profile E-Mail PM Web Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. RE: Port Listening
Nope.  Just finished playing about with my script, and I think thats everything I need the port-sniffing for, so thank you very very much for all the help.:D
[Image: adsig.jpg]
10-31-2007 06:03 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » 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