You might want to port knock and find what answers with a known query - server 
ops can set -port xxx in there launch options, and you may not have a server on 
27015 - it might be on the doom port 666.
 
If you got a beefy box you could be hosting 4 or more servers

--------
Owner Nigredo Studios http://www.nigredostudios.com

--- On Tue, 25/1/11, Netshroud <netshr...@gmail.com> wrote:


From: Netshroud <netshr...@gmail.com>
Subject: Re: [hlcoders] Source RCON PLIST?
To: "Discussion of Half-Life Programming" <hlcoders@list.valvesoftware.com>
Received: Tuesday, 25 January, 2011, 11:55 AM


That's what I want to know.


I've managed to narrow it down to one specific line in my function:



bool CSourceRCON::Write(ServerData eCommand, const char * szCommand) {
        uint32 uByteCount = 12 + strlen(szCommand) + 2;
        uint32 uCommand = (uint32)eCommand;
        char * pPacket = (char*)malloc(uByteCount);

        uint32 uPacketLength = uByteCount - 4;

        memset(pPacket, 0, uByteCount);

        /*
         * There's an oddity here. The following line will return
         * as per the RCON documentation:
         */
        //memcpy(pPacket, &uPacketLength, 2);
        /*
         * Whereas the following line (instead of the above line)
         * will also return an Apple PLIST.
         */
        memcpy(pPacket, &uByteCount, 4);
        
        
        memcpy(pPacket + 4, &m_uPacketID, 4);
        memcpy(pPacket + 8, &uCommand, 4);
        strcpy_s(pPacket + 12, strlen(szCommand) + 1, szCommand);
        pPacket[uByteCount - 1] = '\0';

#if 1
        //DEBUG:
        printf("Authentication packet:\n");
        for (uint16 i = 0; i < uByteCount; i++)
                printf("0x%X ", pPacket[i]);
        printf("\n");
#endif

        return m_Connection->Send(pPacket, uByteCount);
}


oh - I should probably free() that packet.


On Tue, Jan 25, 2011 at 11:47 AM, Adam "amckern" McKern <amck...@yahoo.com> 
wrote:





How the hell is an xml output ended up in your query?

--------
Owner Nigredo Studios http://www.nigredostudios.com

--- On Tue, 25/1/11, Netshroud <netshr...@gmail.com> wrote:


From: Netshroud <netshr...@gmail.com>
Subject: [hlcoders] Source RCON PLIST?
To: hlcoders@list.valvesoftware.com
Received: Tuesday, 25 January, 2011, 11:38 AM






I'm currently trying to build an RCON tool (in C++), but I've come across 
something strange and apparently undocumented. So far I've only implemented 
SERVERCOMMAND_AUTH, but this is the output I'm getting on 127.0.0.1 (password 
is "password", buffer is 255 bytes):




Authentication packet:
0x16 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x3 0x0 0x0 0x0 0x70 0x61 0x73 0x73 0x77 0x6F 
0x72 0x64 0x0 0x0
Sent Authentication packet.
Bytes received: 16
&☺


Bytes received: 254
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
        <key>MessageType</key>
        <string>Result</string>
        <key>Number</key>
        <integer>6</in


Bytes received: 24
teger>
</dict>
</plist>




Connection closed

Since when did Source send PLIST responses? I'm unable to get a packet capture 
of this as Wireshark can't capture loopback, and Source Multiplayer Dedicated 
Server (running TF2) is flat out not responding if I query on my adapter's IP, 
even from another machine. Has the RCON protocol changed?
-----Inline Attachment Follows-----


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


 
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




-----Inline Attachment Follows-----


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




      
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to