Jump to content

I'm going to try and implement the current Source RCON Protocol.

Recommended Posts

Ok, I dont really know what I'm doing when it comes to networking, but I'm determined to use this as an excercise in going beyond basic application automation with AutoIt.

I know some people in the past have made some half-hearted attempts at implementing the Source Rcon Protocol in AutoIt, but I'm going to take a stab at designing some robust, reusable functions.

First of all, there's some documentation on the protocol here.

I'm not completely cognizant of a few things:

1. Threads in the past talked about the rcon protocol being UDP, but it looks like it's now TCP. Am I understanding the above page correctly?

2. Basically, it looks like after establishing a connection, I'll do something like:

TCPSend($SocketForSRCDS, $AnAuthPacket)

My question is, I'm not quite sure how to go about constructing such a packet.

From the above link:


The command packet format consists of:

* packet size (int)

o the number of bytes from the start of the requestid to the end of string2 (including the null byte). It must be at least 10.

* request id (int)


o SERVERDATA_AUTH is currently 3


* string1 (is the command to run).

* string2 must be null ("");

For RCON connections the first command must be a SERVERDATA_AUTH command. If a SERVERDATA_EXECCOMMAND command is sent prior to successful authentication then a SERVERDATA_AUTH_RESPONSE response packet with the failure condition is sent (see the response section for details). The INT's are 32 Bit Little Endian byte order.

Could someone give me a hint at how I go about constructing such a packet? If anyone wants to help me I can give access to a Source server for testing this stuff out.

I'm sure as I work through this I'll have some more questions!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

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