GiyoMoon / steam-server-query

Module which implements the Master Server Query Protocol and Game Server Queries.
https://npmjs.com/package/steam-server-query
MIT License
25 stars 2 forks source link

Server rules are hashed #3

Closed tomyshoam closed 2 years ago

tomyshoam commented 2 years ago

When i query a V rising server for server rules i get a hashed version of the rules { name: 'game-settings-hash', value: '77832daa06691342fdb31bdfe990d359880d156d8ccd287314cc2bfe8d449134' }, { name: 'settings0', value: 'AgAAAAAAAAAAAAAAAAAAAAAAAACgQAEDAgUAAAAAAAAAAAIAAAAAAwMAAAAABAQAAAAABQUAAAAABv4FAAAAAAAAAAAUAAAAABUyAAAAADNQAAAAAFGgAAAAAKH+' }, { name: 'settings1', value: 'BAAAAAEtAQJaAgOWBAT6BgQAAAABAQIBAwEEAaBpZjIJABAAChIAPM08MztmPAA8ADzNPAA8zTwAPAA8AEUAPAA8ADwAPAA8ADwAPABAZjoAQGY6ZjoAPEBOAEUA' }, { name: 'settings2', value: 'RTBfgFMAPAA8ADwAPAA8ZjoAPGYuADyaOZo5ADwAPAA8ADwAQABAAEABAgAAAgMAAAAAFwAAABcAFAAVABQAFgAAAgGbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' }, { name: 'settings3', value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' } can you point me in the right direction of decoding those?

GiyoMoon commented 2 years ago

Hey @tomyshoam Are you sure these are hashes? The decryption of hashes is impossible. These values probably are used to verify some other, plain text values.

tomyshoam commented 2 years ago

Thanks for the quick response @GiyoMoon I am not sure if those are hashed to encrypted, the list of rules should be realy long i attached an example of the rules files from a server, might be something to do with the extra long response not being split correctly? ServerGameSettings - Copy.txt

GiyoMoon commented 2 years ago

I assume these rules are from another server? Could you maybe send me their addresses so I can have a look? The long response shouldn't be a problem and it also seems that the response is correct (one rule is even called game-settings-hash) Also, the example file you provided isn't a valid rules response, as the rules can only contain a string value, I'm not sure how the game server sends these rules in the response.

AunePVP commented 2 years ago

The rules aren‘t hashed. I don‘t even think they are encrypted. If I edit a clue in the settings it only changes one part of the query response. Since the values aren’t displayed in hex, we Need to find out which letter can be translated to which number. Unfortunately I don‘t have enough time to do this

tomyshoam commented 2 years ago

I assume these rules are from another server? Could you maybe send me their addresses so I can have a look? The long response shouldn't be a problem and it also seems that the response is correct (one rule is even called game-settings-hash) Also, the example file you provided isn't a valid rules response, as the rules can only contain a string value, I'm not sure how the game server sends these rules in the response.

23.109.143.164:28115 this is the server i tried it on, also the file i attached is actually from a server i hosted. thats atleast the format you use to "set" them, what we should get back when querying might differ but the amount of rules should pretty much remain the same

these are the possible value you can set https://cdn.stunlock.com/blog/2022/05/25083113/Game-Server-Settings.pdf

tomyshoam commented 2 years ago

The rules aren‘t hashed. I don‘t even think they are encrypted. If I edit a clue in the settings it only changes one part of the query response. Since the values aren’t displayed in hex, we Need to find out which letter can be translated to which number. Unfortunately I don‘t have enough time to do this

From testing it on my own server and tweaking a single setting everytime i pretty much see that its true and the settings are sort of translated into this wierd string

GiyoMoon commented 2 years ago

Like I said, the values you're getting there are probably just hashes used to verify the actual settings. I searched for random V rising servers and every server responded with these hashes, some had a few additional rules, but it seems that this is just the way V rising servers respond to this request.

I'm going to close this issue as it's not related to the steam-server-query package :) Feel free to re-open it, if you have any issues with the package itself.

AunePVP commented 2 years ago

Like I said, the values you're getting there are probably just hashes used to verify the actual settings. I searched for random V rising servers and every server responded with these hashes, some had a few additional rules, but it seems that this is just the way V rising servers respond to this request.

I'm going to close this issue as it's not related to the steam-server-query package :) Feel free to re-open it, if you have any issues with the package itself.

They are not hashed. And yes that‘s how the servers respond to the request.