computergeekxp Posted January 14, 2006 Share Posted January 14, 2006 (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 < 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 January 16, 2006 by computergeekxp Link to comment Share on other sites More sharing options...
computergeekxp Posted January 14, 2006 Author Share Posted January 14, 2006 >Bump Link to comment Share on other sites More sharing options...
Developers Jos Posted January 14, 2006 Developers Share Posted January 14, 2006 (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 January 14, 2006 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 More sharing options...
computergeekxp Posted January 14, 2006 Author Share Posted January 14, 2006 (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 January 14, 2006 by computergeekxp Link to comment Share on other sites More sharing options...
computergeekxp Posted January 14, 2006 Author Share Posted January 14, 2006 I know that it is possible to do this in C, but is there perhaps a DLL call I can use? Link to comment Share on other sites More sharing options...
computergeekxp Posted January 15, 2006 Author Share Posted January 15, 2006 >Bump Link to comment Share on other sites More sharing options...
computergeekxp Posted January 16, 2006 Author Share Posted January 16, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now