Loading Server List from Master


(Dit) #1

Hi
i need some help.

I need to know the request-command that i can to send to a Master-Server like ID2.EVENBALANCE.COM. I want to load the Server List with UDP Connection (Java).

for example:
If i send getstatus to a GameServer, i will get a list with players and systeminfo. Now i need a command to get ServerList from Master-Server.

Please help :slight_smile:

P.S. sorry for my bad English.


(system) #2

Goodmorning Dit,

maybe this thread is of any help for you :

http://splashdamage.com/forums/showpost.php?p=210383&postcount=9

(Don’t know anything about java but maybe it helps a bit :slight_smile: )

Greets,
Dutchman.


(Paul) #3

Indeed, information you’ll get with \u00FF\u00FF\u00FF\u00FFgetservers 84

next up: the data you can ‘translate’ into:

[QUOTE=Paul;210180]
You get all long string of informatin in 5 or 6 bytes and then another
The ascii sign you get back you have to translate back to a number so for example A will produce 65
the first 4 bytes explain the IP so
AAAA will make 65.65.65.65 after that there will follow 2 or 1 byte.
The first byte you need to multiple by 256 and then + the 2nd byte if that is included. This will make the port you need.[/QUOTE]


(dutchmeat) #4

Just to clarify:

0xFF0xFF0xFF0xFF getservers 84

The first four bytes is the socalled Magic string, this tells the Q3 engine/master server that he’s dealing with a request from ‘outside’(but no playermovement, shooting etc network messages).

getservers is the actual command to retrieve servers

84 is the protocol thats being used.
NOTE, this might be different throughout versions of RTCW/ ET.

Can you tell me, why are you doing this in JAVA ?


(reaply) #5

It’s obvious he wants to make one of those java things that you can click on the ip from a website and it will open wolfenstein et (never opens for me it always says firefox cannot open).


(dutchmeat) #6

I think u’re confused with a launcher(which can launch wolf using a protocol extension like etqw://134.141.14.14/), this can easily be done with any other language.

And a query tool, which just gets all the servers and players to do stuff with it.


(Wicked0ne) #7

ha. i decided to do the same exact thing myself…but im running into some issues. Im able to send the master servers the udp packet containing the “getservers 84” and i get back a response(took alot of messing around to even get a response!)…but im unable to make sense of the reponse. I know you have to convert the bytes to decimal to get the ip:port …but the response im gettting back does not look right or make sense to me. Ive put the code here: http://pastebin.com/sMwpg24A …hopefully someone cans point out what im doing wrong. any help is appreciated :slight_smile:


(dutchmeat) #8

You should check out QStat, and see how they did it,
http://qstat.svn.sourceforge.net/viewvc/qstat/trunk/qstat2/

Good luck reading the main code tho, its about 13000 lines (1 file)

In an old project, we’ve used the qstat executable, parsed the output(which is quite fast), and send a getserverinfo query to each ip.


(Paul) #9

[QUOTE=Paul;210180]
You get all long string of informatin in 5 or 6 bytes and then another
The ascii sign you get back you have to translate back to a number so for example A will produce 65
the first 4 bytes explain the IP so
AAAA will make 65.65.65.65 after that there will follow 2 or 1 byte.
The first byte you need to multiple by 256 and then + the 2nd byte if that is included. This will make the port you need.[/QUOTE]

Like I said, this is the way I extracted the data - I think that should work


(Wicked0ne) #10

yea. id like to keep it all in java so it can be system independant as possible… paul if you look at the pastebin i made…the response i get back from the main server is gibberish…translating the output from what i get…using what you suggest results in more gibberish. I did a packet capture with wireshark and inspected the individual packets and in the raw packets i WAS able to get ip:port from the text… you can see the raw packet capture here http://picpaste.com/pics/packet.1277751876.png …what makes sense…but somewhere along the line…the code i pasted doesnt do something right and it results in gibberish.

While im still a noob at programming i thought that this would be a good project for me to learn. If anyone has any other ideas im all ears(eyes??) :slight_smile:


(dutchmeat) #11

        for (int i = 1; i < split.length; i++) {
			if (split[i].length() != 6)
				continue;
				
            System.out.println((int)split[i].charAt(0) + "." + (int)split[i].charAt(1) + "." + (int)split[i].charAt(2) + "." + (int)split[i].charAt(3)+":"+((int)split[i].charAt(4)*256+(int)split[i].charAt(5)));
        }

Now explain what I just did…


(Wicked0ne) #12

OMG. dutchmeat…you are the freaking man!!. Using that snippet of code works…i had been racking my brain for so long on this…now i can look at and learn what that code does…and how i was going about this wrong. Thank you so much…its greatly appreciated :slight_smile:


(dutchmeat) #13

You may want to split it up and see what it does, the (int) is called type-casting, and is an effecient method of turning characters into numbers.


(Indloon) #14

Also:
\xFF\xFF\xFF\xFFgetservers 82


(ailmanki) #15

you can do it yourself … actually there is no third party tool needed - at least for firefox.
http://kb.mozillazine.org/Register_protocol

I actually always wanted to make this, but I ended up using shortcuts … lol, since neither splatterladder nor trackbase had a link like: et://bunker2.aaxxss.com


(Mateos) #16

The thread is from 2010, but if he has subscribed to this thread he’ll have his answer x)


(Indloon) #17

[QUOTE=ailmanki;337111]you can do it yourself … actually there is no third party tool needed - at least for firefox.
http://kb.mozillazine.org/Register_protocol

I actually always wanted to make this, but I ended up using shortcuts … lol, since neither splatterladder nor trackbase had a link like: et://bunker2.aaxxss.com[/QUOTE]

Splatterladder connector(Programm) had it.
et://188.165.209.117:29000/82


(ailmanki) #18

the /82 craps it