Zelly Posted October 8, 2015 Share Posted October 8, 2015 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: 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. Quote Link to comment Share on other sites More sharing options...
Clan Friend SunLight Posted October 9, 2015 Clan Friend Share Posted October 9, 2015 (edited) a hex dump + ascii would have been more useful edit: what do you mean by 'decode'? Edited October 9, 2015 by SunLight 1 Quote Link to comment Share on other sites More sharing options...
cubbie Posted October 9, 2015 Share Posted October 9, 2015 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? 1 Quote Link to comment Share on other sites More sharing options...
Clan Friend SunLight Posted October 10, 2015 Clan Friend Share Posted October 10, 2015 yes I think it's just IP addresses+port, you need to send a getinfo to them if you want to get server name, etc. and parse the server response 1 Quote Link to comment Share on other sites More sharing options...
Zelly Posted October 10, 2015 Author Share Posted October 10, 2015 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 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. Quote Link to comment Share on other sites More sharing options...
Clan Friend SunLight Posted October 11, 2015 Clan Friend Share Posted October 11, 2015 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 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 , 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) 5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.