PDA

View Full Version : Sever Query Protocol


Andromeda
15th October, 2007, 12:18 AM
Has anyone else tried to figure out how to externally query UT3 servers? The great thing about UT & UT2k* was that we could query servers with udp socket scripts. It helps the pugging communities on IRC, and is also great for clan websites :)

It looks like a 'challenge' request needs to be sent to the server, and then another UDP packet needs to be sent with the server's response, and then you finally get the reply with the data you want.

I was testing sending data to the 13000 UDP server port, but was unable to get a response back. I wasn't sure if the proper port was being used, I only chose 13000 because it was listed in the BaseEngine.ini

Packet I am sending get the challenge request (in hex):
FE FD 09 10 20 30 40

I was assuming it was using the same gamespy protocol as Battlefield 2142.
However, when you packet sniff and see data coming in and out when using the in-game browser, you can see the browser is sending the packets to completely random UDP ports.

Any information would be greatly appreciated :)

...Maybe El Muerte can cook up a package that makes querying act similarly to UT/UT2K*

elmuerte
15th October, 2007, 08:02 AM
I haven't looked at it, but I have doubts the functionality will be available.
UT3 uses the GameSpy library, and the communication will probably be locked down (encrypted using GameSpy's stuff). Additionally it appears that a random port will be used, making it impossible to query a server just by it's IP and gameport.
I don't know if it will be possible to provide a custom query mechanism. Last time I checked they dropped tcp or udp access from unrealscript and I don't know if this functionality has been brought back.

zoro
15th October, 2007, 08:51 AM
Ah here :/
That's terrible news - if indeed it is true...

ep1taph
15th October, 2007, 04:11 PM
So does this mean we no longer need to have 7778 and 7787 on our servers? I also noticed none of the query tools worked.

DvTJonahHex
15th October, 2007, 05:18 PM
Ah here :/
That's terrible news - if indeed it is true...Calling this "terrible news" is without a doubt the biggest understatement that I have encountered since I started playing Unreal in 1998. :cussing:

apophis.ch
16th October, 2007, 11:07 AM
Upon the Documentation of the Queryprotocol in the Wiki:

http://wiki.unrealadmin.org/index.php?title=UT3_query_protocol

I hacked a proof of concept together

http://download.apophis.ch/UT3/example.php

Feel Free to use the Code I made, as said I only had some minutes time, but I am sure some of you try to do it better yourself and its a good start especially if you use the Documentation along side.

Here is the code:

http://download.apophis.ch/UT3/ut3show.rar

Issues:

* I dont consider Negative numbers, I just try till I get a postive one
* sometimes it hangs (probably too small challange numbers, I ignore the 0 character as end of string) Just reload
* 0 is used as String delimiter
* Timestamps are hardcoded at the moment
* Port is Hardcoded at the moment

Use this script if u need the Queryport:

http://download.apophis.ch/UT3/cron_ut3demo.rar
This is from Yannick Delwiche and came of the ut3server list

With that info it should now be possible to write a flexible Script, hope you have fun.

greets Apophis

zoro
16th October, 2007, 11:23 AM
These scripts apparantly crash UT3 Servers - so be careful for a while :)

apophis.ch
16th October, 2007, 12:19 PM
They crash anyway :P

deadite66
16th October, 2007, 12:30 PM
qstat does seem to work.
found some info here http://d3.jpn.org/wiki/GyaASE:Master_Servers

zoro
16th October, 2007, 12:31 PM
They crash anyway :P

:)

KRIS_PL
16th October, 2007, 01:08 PM
They crash anyway :P

damn right :P