Sign in to follow this  
Followers 0
computergeekxp

Listen on UDP PORT used by another app

7 posts in this topic

#1 ·  Posted (edited)

The topic title pretty much says it all. I want to see what is being sent on a specific port that another application is already using. The problem is when I call the UDPBind an error occurs which I assum happens because that port is in use. If anyone has any ideas or has tried to do this becefore, your help would be greatly appreciated. Thanks.

(just a quickly modifed piece of code from the help file)

;Start The TCP Services
;==============================================
$test=@IPAddress1
UDPStartUp()

; Create a Listening "SOCKET"
;==============================================

$MainSocket = UDPBind($test, 6881)
If @Error <> 0 Then Exit MsgBox(16, "Error", "Unable to intialize socket.")
$recv = UDPRecv($MainSocket, 100)
If @error Then MsgBox(1,"","error")
msgbox(1,"",$recv)
    

UDPCloseSocket($MainSocket)
UDPShutdown()

>UPDATE :lmao: <

Well since I guess no one knows how, maybe there is another way. Here is the big picture:

I play the Halo Demo but ofcourse I am too cheap to buy the full version (I could and am torrent it but I know there are others out there like me). So I wanted to write a program that would detect what server and then intern the modded map the client was trying to load by asking the the program running the server. The server will send back a list of clients(players) currently connected and have the patched file where the client can then download the patch (If no one else has it, the file will be downloaded from the server). Once the download is complete, the client will then tell the server to add the client to the list of avaialable downloads of the patch. The clients map file will then be patched and reconnect to the server. Once they leave the server, the backup of the map will be restored.

Hopefully that is pretty clear, if not just ask...

Edited by computergeekxp

Share this post


Link to post
Share on other sites



>Bump :lmao:

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

When you want to monitor UDP packets you will have to use something different because Opening or Binding to a Port will never accomplish what you want. You need to use a Packet sniffer program.

The only thing to take into account is that a Switch will not forward every Packet to all ports so you will need a Hub when you want to monitor another PC than your own...

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks. Would I use Paket dump (i think that's what it's called. I read it somewhere on the forum) but how exactly could I see what that program is capturing? I was kind of hoping to make this light weight and not have to install an app like WinPCap since this script is to be given to gamers.

Edited by computergeekxp

Share this post


Link to post
Share on other sites

I know that it is possible to do this in C, but is there perhaps a DLL call I can use?

Share this post


Link to post
Share on other sites

>Bump :lmao:

Share this post


Link to post
Share on other sites

Well since I guess no one knows how, maybe there is another way. Here is the big picture:

I play the Halo Demo but ofcourse I am too cheap to buy the full version (I could and am torrent it but I know there are others out there like me). So I wanted to write a program that would detect what server and then intern the modded map the client was trying to load by asking the the program running the server. The server will send back a list of clients(players) currently connected and have the patched file where the client can then download the patch (If no one else has it, the file will be downloaded from the server). Once the download is complete, the client will then tell the server to add the client to the list of avaialable downloads of the patch. The clients map file will then be patched and reconnect to the server. Once they leave the server, the backup of the map will be restored.

Hopefully that is pretty clear, if not just ask...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0