Creating a C++ or C simple rcon tool

Doubts, help and support about QuickBMS and other game research tools
Airitech
Posts: 5
Joined: Sun Aug 20, 2017 4:07 am

Creating a C++ or C simple rcon tool

Post by Airitech »

Hey guys, new the forum here, i came from luigis website and i have a question.

Im a basic C++ coder. I know the basics and thats about it.

My goal is to create a very simple rcon tool for CoD4.

What the tool would do, is simply send a command to my cod4 server every 10 minutes or so. I havnt found any source code online thats free use so that i can use it and modify it so im looking for some help getting started.

First, i looked at luigis tool of rcon brute force testing and tried to see if i could make something happen with that and i didnt get very far.
I know that you need some type of sockets to connect with quake 3 rcon, but all i want to do is send a simple command every ten minutes.

I could make the basic program to send a command but when it comes to custom functions and the sockets parts im pretty lost. Any help or maybe a tutorial or a step in the right direction would be sweet, thankyou!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Creating a C++ or C simple rcon tool

Post by aluigi »

I don't think you have to reinvent the wheel.
multircon does a very good job and supports the sending of just one command (or even more commands with the -f option).
For the 10 minutes thing you can use sleepy, example:

Code: Select all

sleepy 10ml multircon -p mypassword -c mycommand HOST PORT

Links:
http://aluigi.altervista.org/papers.htm#multircon
http://aluigi.altervista.org/mytoolz.htm#sleepy
Airitech
Posts: 5
Joined: Sun Aug 20, 2017 4:07 am

Re: Creating a C++ or C simple rcon tool

Post by Airitech »

Sweet, thankyou!
This will definitely work!

But i am also curious on how simple it is to setup my own? How hard would it be? Just for one function. Could a beginner like me do it?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Creating a C++ or C simple rcon tool

Post by aluigi »

In the first post you said that you are lost with sockets programming so... :)

Just for your information, the following is the content of the udp packet but there are TONS of information online about rcon:

Code: Select all

  00000000  ff ff ff ff 72 63 6f 6e 20 6d 79 70 61 73 73 77   ....rcon mypassw
  00000010  6f 72 64 20 6d 79 63 6f 6d 6d 61 6e 64 00         ord mycommand.
Airitech
Posts: 5
Joined: Sun Aug 20, 2017 4:07 am

Re: Creating a C++ or C simple rcon tool

Post by Airitech »

Haha yeah thats getting complicated! Ill mess around and maybe ill come close and get it or maybe ill just keep using your multircon!

Anyways, thanks for the response alugi i appreciate it!