Jump to content

Listen on UDP PORT used by another app


Recommended Posts

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
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
Link to comment
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...

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...