I almost got it.
There are no built in operators for bit shifting (<<,>>) in powershell v2.
So it does not add two bytes well. as shown in the gameport and steamID
output:
$EDF = $ReceiveBuffer[$i]
if($EDF -and 0x80) # servers game port number is
included.
{
$i++
[int16[]]$gameport = $receivebuffer[$i] +
$receivebuffer[$i++]
if($EDF -and 0x10) # The server's SteamID
{
[int64[]]$SteamID = $receivebuffer[$i]
+ $receivebuffer[$i++] + $receivebuffer[$i++] + $receivebuffer[$i++] +
$receivebuffer[$i++] + $receivebuffer[$i++] + $receivebuffer[$i++] +
$receivebuffer[$i++]
if($EDF -and 0x01) # The steam
application
ID<http://developer.valvesoftware.com/wiki/Steam_Application_IDs>again
{
$i++;$i++
[int16[]]$AppID2 =
$receivebuffer[$i]
}
}
}
output:
Type: I
Protocol Version: 48
Server Name: SC Test Server -DAL- [2815]
Map: datacore
Game Directory: SvenCoop4
Game Description: Sven Co-op 4.6 or later
AppID: 70, 77
Number of players: 0
Maximum players: 24
Number of bots: 0
Dedicated: d
OS: w
Password: 1
Secure: 1
Game Version: 1.1.2.1
EDF: 145
gameport: 270
SteamID: 769
AppID2: 70
> Thanks,
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux