Server query

This is for general discussion about Hidden & Dangerous 2, talk about what you liked or what you didn't like about the sequel. Talk about multiplayer games, setup matches etc.
Stern
Lieutenant
Posts: 101
Joined: Sun Nov 09, 2014 11:44 am

Server query

Unread post by Stern » Mon Mar 13, 2017 3:30 pm

Does anyone here knows what form of data this "query" request should be to be read correctly by server ?

http://int64.org/docs/gamestat-protocols/gamespy2.html
This is the request of info that has map name, rules, players and all that.
Click Here !

Stern
Lieutenant
Posts: 101
Joined: Sun Nov 09, 2014 11:44 am

Re: Server query

Unread post by Stern » Thu Mar 16, 2017 11:52 am

Little update here:
I managed to figure out in what form it must be sent.

Obj.Pascal code:

Code: Select all

Sdata: array [0..9] of byte = ($FE,$FD,$00,$43,$4F,$52,$59,$FF,$FF,$FF);
...
UdpSocket1.SendBuf(Sdata,sizeof(Sdata));
This gets return data size about 250 (if server is empty).
Click Here !

Stern
Lieutenant
Posts: 101
Joined: Sun Nov 09, 2014 11:44 am

Re: Server query

Unread post by Stern » Wed Mar 29, 2017 10:07 am

Here is a main part of the request code in Pascal.

https://1drv.ms/t/s!Aj4b71jV4JhLgnctBazR2FIySqks
Click Here !

Stern
Lieutenant
Posts: 101
Joined: Sun Nov 09, 2014 11:44 am

Re: Server query

Unread post by Stern » Wed Mar 29, 2017 2:21 pm

Here is this program, for what i needed this queryng info.
Read readme to know how to use it !


EDIT:
https://1drv.ms/u/s!Aj4b71jV4JhLgwIpQ58DiTOwgd1k
Last edited by Stern on Sat Oct 21, 2017 8:20 am, edited 1 time in total.
Click Here !

User avatar
Jason
Administrator
Posts: 1895
Joined: Thu Sep 02, 2004 7:26 pm
Location: Perth, Australia
Contact:

Re: Server query

Unread post by Jason » Sat Oct 21, 2017 5:22 am

Those links aren't working for me, are you able to add the program as an attachment?

Stern
Lieutenant
Posts: 101
Joined: Sun Nov 09, 2014 11:44 am

Re: Server query

Unread post by Stern » Sat Oct 21, 2017 7:48 am

I guess they are outdated, I have added some features to this program: JoinServer and ability to read out servers listed in H&D2 ServerList.bin Favorites list.
This way the program can be used in many ways, by Qtracker list, by custom list or HD2 favosrites list.

If i get rid of some minor flaws i add new link !

*Old version in last post (Edited link).

Found a screenshot of dev process :)
hd2sim01.jpg
hd2sim01.jpg (440.57 KiB) Viewed 21729 times
Click Here !

User avatar
JonnySniper
Lieutenant
Posts: 101
Joined: Thu Dec 24, 2009 11:33 am
Location: Germany
Contact:

Re: Server query

Unread post by JonnySniper » Mon Oct 23, 2017 5:09 pm

You can also Scan the Servers without the bin file.
I Used this funtcion in rsc.

Stern
Lieutenant
Posts: 101
Joined: Sun Nov 09, 2014 11:44 am

Re: Server query

Unread post by Stern » Wed Oct 25, 2017 8:15 pm

You mean ServerList.bin ?
Does this info get duplicated to somewhere else? Registry maybe ?
I use that .bin file only to read Favorites section.


I used RSC in 2014 for my server, worked well...and i teared it apart as you might remember...:) Resized it and found some hidden buttons...
i thought they might be hidden and dangerous buttons.
Click Here !

User avatar
JonnySniper
Lieutenant
Posts: 101
Joined: Thu Dec 24, 2009 11:33 am
Location: Germany
Contact:

Re: Server query

Unread post by JonnySniper » Fri Oct 27, 2017 9:49 am

Stern wrote:
Wed Oct 25, 2017 8:15 pm
You mean ServerList.bin ?
Does this info get duplicated to somewhere else? Registry maybe ?
I use that .bin file only to read Favorites section.
Did you meant me?

Which hidden and dangerous Buttons?😂
In the Early Version i hide some Test Buttons for
the Development.
And i had a List of Special signs becouse Delphi
Doesnt Support it to this Time :)

In the last Version of rsc i added a Button, on side of Login... there you can Scan all hd2 Servers are currently Running.
But i include a Filter, that the ips doesnt Show 2 Times.
It use the same function as the Game as well.

Stern
Lieutenant
Posts: 101
Joined: Sun Nov 09, 2014 11:44 am

Re: Server query

Unread post by Stern » Fri Oct 27, 2017 2:26 pm

It takes them from Qtracker ? Ip confirms it.
I use the same, but I also use the .bin file and custom server list.

//---------------------------------------------------------------------------------
I didnt find what ports RSC uses, its not in Readme.

Ok, i can find out this way... but not everyone knows how.
And currports can help...

Code: Select all

  object ServerSocket: TServerSocket
    Active = True
    Port = 12001
    ServerType = stNonBlocking
    ThreadCacheSize = 100000
    OnClientConnect = ServerSocketClientConnect
    OnClientDisconnect = ServerSocketClientDisconnect
    OnClientRead = ServerSocketClientRead
    OnClientError = ServerSocketClientError
    Left = 16
  end

  object Pong: TServerSocket
    Active = True
    Port = 11005
    ServerType = stNonBlocking
    ThreadCacheSize = 100000
    OnClientRead = PongClientRead
    Left = 64
  end
The pong is for online users ?

Readme mentiones: Note : take a look at blanks...
spaces ?
You could use trim:
Trim(text to trim)
It removes leading and trailing blanks...
JonnySniper wrote:
Fri Oct 27, 2017 9:49 am
Which hidden and dangerous Buttons?😂
In the Early Version i hide some Test Buttons for
the Development.
This was a topic in RpR, some players were hacking servers and there was a claim that RSC is used for this.
This is why I investigated it.
Click Here !

User avatar
JonnySniper
Lieutenant
Posts: 101
Joined: Thu Dec 24, 2009 11:33 am
Location: Germany
Contact:

Re: Server query

Unread post by JonnySniper » Sun Oct 29, 2017 11:21 am

It takes them from Qtracker ? Ip confirms it.
I use the same, but I also use the .bin file and custom server list.
But why you need Serverlist?
My list is by QTracker yes.
I didnt find what ports RSC uses, its not in Readme.
For what need a client the Portnumbers.
Less is sometimes more.
No other Tool confirms his Ports...
but just for you, its 11005 and 12001 :roll:
Readme mentiones: Note : take a look at blanks...
spaces ?
You could use trim:
Trim(text to trim)
It removes leading and trailing blanks...
Its in the code , but sometimes it doenst work.
This was a topic in RpR, some players were hacking servers and there was a claim that RSC is used for this.
This is why I investigated it.
The Server Write all connections to its Logfile.
If Somebody would hack the Server by a client tool, the Server will Write his Ip in the file.
And this isnt able to hack, becouse its the first action in the connection event of Serversocket.

Stern
Lieutenant
Posts: 101
Joined: Sun Nov 09, 2014 11:44 am

Re: Server query

Unread post by Stern » Mon Oct 30, 2017 5:11 pm

Serverlist.bin is just-in-case if Qtracker goes offline, then this program can be used other way... and some players does'nt even use Qtracker.
Click Here !

Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests