Jump to content

server query


Recommended Posts

ÿÿÿÿINoAmmo.co.uk | #4 Dust2 Deathmatch

Hello peole i try to transelate this string into reable text.

alot you guys cant see because its binary.

this is the return format:

Data  Type  Comment
Type  byte  Should be equal to 'I' (0x49)
Version  byte  Network version. 0x07 is the current Steam version. Goldsource games will return 48 (0x30), also refered to as protocol version.
Server Name  string  The Source server's name, eg: "Recoil NZ CS Server #1"
Map  string  The current map being played, eg: "de_dust"
Game Directory  string  The name of the folder containing the game files, eg: "cstrike"
Game Description  string  A friendly string name for the game type, eg: "Counter Strike: Source"
AppID  short  Steam Application ID
Number of players  byte  The number of players currently on the server
Maximum players  byte  Maximum allowed players for the server
Number of bots  byte  Number of bot players currently on the server
Dedicated  byte  'l' for listen, 'd' for dedicated, 'p' for SourceTV
OS  byte  Host operating system. 'l' for Linux, 'w' for Windows
Password  byte  If set to 0x01, a password is required to join this server
Secure  byte  if set to 0x01, this server is VAC secured
Game Version  string  The version of the game, eg: "1.0.0.22"
Extra Data Flag (EDF)  byte  if present this specifies which additional data fields will be included
if ( EDF & 0x80 )  short  The server's game port # is included
if ( EDF & 0x10 )  long long  The server's SteamID is included
if ( EDF & 0x40 )  short string  The spectator port # and then the spectator server name are included
if ( EDF & 0x20 )  string  The game tag data string for the server is included [future use]
if ( EDF & 0x01 )  long long  The server's 64-bit GameID is included

this is my code now:

UDPStartup()
#include <Array.au3>
$socket = udpopen("78.129.189.57", 27030)
;:
If @error <> 0 Then
ConsoleWrite(@error)
Exit
EndIf
$status =UDPSend($socket, "ÿÿÿÿTSource Engine Query"& Chr("0"))
While 1

    $data = UDPRecv($socket, 99999)
    If $data <> "" Then
        ConsoleWrite($data)
  ExitLoop
    EndIf
WEnd
$result = StringTrimLeft($data, 3)

$i=0
for $i=0 to 200
$extract = BinaryMid($data, $i, 200)
$buffer = BinaryToString($extract)
ConsoleWrite(@CRLF & $buffer)
next
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...