querying master & regular WolfET server


(YourFather_CZ) #1

Hi,

I’m coding (Java) simple WolfET server browser.

If I send query to WolfET master server via UDP packet containing:

\u00FF\u00FF\u00FF\u00FFgetservers 84

I recieve fine response.

However, if try to query WolfET server via UDP packet containing:

getinfo\u00E1

or

getinfo\u00A0

or

getstatus\u00E1

or

getstatus\u00A0

it always responds me:

\u00FF\u00FF\u00FF\u00FFdisconnect

Any idea how to obtain infos about WolfET servers properly? :rolleyes:


(Paul) #2

Yes! I did this with php last week… Will try to find the code :wink:
Anyway I can tell you this already:

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.


(YourFather_CZ) #3

Obtaining `IP:port ’ list works pretty good.

But I’m unable to retrieve information about every single WolfET server (players, sv_hostname, etc.).


(Paul) #4

That’s not included in the master list, you have to connect to all servers individually and put the getstatus command to retrieve that information.


(valkyr) #5

[QUOTE=<Your>Father<CZ>;210168]However, if try to query WolfET server via UDP packet containing:

getinfo\u00E1

or

getinfo\u00A0

or

getstatus\u00E1

or

getstatus\u00A0

it always responds me:

\u00FF\u00FF\u00FF\u00FFdisconnect

[/QUOTE]

Where did you get those from?

Messages are always sent with the 4 byte marker first, then the command, so it should be

\u00FF\u00FF\u00FF\u00FFgetstatus

(YourFather_CZ) #6

I tried this one too - doesn’t woork too. :frowning:


(Paul) #7

I thought it was \xFF\xFF\xFF\xFFgetstatus\x00 at least I used that with php


(system) #8

Hi daddy, Luke ? :wink: (Sorry i could not resist to quote Darth Vaders “Luke i am your Father” :stuck_out_tongue: )

a buddy of mine just released a Java thing (converted to .exe) wich displays or query our server and he told me to try :

string getstatus = 0xFF + 0xFF + 0xFF + 0xFF + "gestatus
";

Hope it works :slight_smile:


(YourFather_CZ) #9

Thanks for help to all. :slight_smile:

This opened my mind…

There was a problem with using incompatible data types.

I’ve been using this:

byte[] message = "\u00FF\u00FF\u00FF\u00FFgetstatus".getBytes();

\u00FF - this is Unicode escape sequence which requires 2 Bytes of memory, however `byte’ datatype takes only 1 Byte

Now I’m using this and everything works fine now:

			byte[] message = "XXXXgetstatus
".getBytes();
			for ( byte index = 0 ; index < 4 ; index++)
			{
				message[ index ] = (byte) 0xFF;
			}