Jump to content

Python 3 ET GetserversResponse


Zelly

Recommended Posts

It is a response to getservers to a sv_master server

 

So I am trying to figure out what I gotta do to interpret this: 71538cf3b4d638449b35f376e57df5db.png

 

Right now the only way I can even read that much is to just open a file and 'wb' to the file.

I have looked at the code in C that parses it but I don't see anywhere where it decodes it, it just seems to know that they are addresses. First time I have worked with this sort of problem, normally the responses for ET just come over as plain text.

 

Any help appreciated.

Link to comment
Share on other sites

As SunLight already said try using a hexdump such as

 

0x5C seems to be the delimiter, after that 4 bytes for the ip, 2 bytes for the port and another delimiter

 

Convert 5C 08 09 04 E3 6D 39 5C without delimiter to decimal and you are done

0x08 8

0x09 9

0x04 4

0xE3 227

0x6D39 27961

 

 

Does anybody know a good description about the protocol?

  • Like 1
Link to comment
Share on other sites

Sorry late reply, was out, then was too tired/lazy to work on this again.

 

I just meant I didn't see anywhere where it did anything special to the response in the C code. I don't know C though so that is probably why :D

 

Is this what you need? http://pastebin.com/Dgke5FnV

 

@cubbie I think I understand will see if I can totally grasp it with some trial and error.

Link to comment
Share on other sites

  • Clan Friend

Sorry late reply, was out, then was too tired/lazy to work on this again.

 

I just meant I didn't see anywhere where it did anything special to the response in the C code. I don't know C though so that is probably why :D

 

Is this what you need? http://pastebin.com/Dgke5FnV

 

@cubbie I think I understand will see if I can totally grasp it with some trial and error.

Yes that was easier to read :D, as cubbie said '\' is the delimiter and then you have an ip address, 4 bytes and the port in 2 bytes.

 

You don't see anything special in the C code because the ips are just stored, and the server info is taken in other places (by sending a getinfo)

  • Like 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.