Will connect to one or all defined ASA Servers RCON port to execute commands
Python v3.13+
- Clone repository or download zipped repo.
- Rename the example_config.ini to config.ini
- Edit the config.ini with your servers information
Execute with -h as show below for syntax help
python asa_rcon_client.py -h
usage: rcon_client.py [-h] [--version] -m {island,scorched,extinction,aberration,center,astraeos,ragnarok,all} [-c COMMAND] [-b BROADCAST_MESSAGE] [-t TIMEOUT] [-v]
Connects to ASA RCON port to execute commands
options:
-h, --help show this help message and exit
--version show program's version number and exit
-m, --map {island,scorched,extinction,aberration,center,astraeos,ragnarok,all}
Map name from section in config.ini or "all" to execute on all maps
-c, --command COMMAND
Command to execute, multiple words must be enclosed in quotes. Can not be combined with -b
-b, --broadcast-message BROADCAST_MESSAGE
Message to broadcast, multiple words must be enclosed in quotes. Can not be combined with -c
-t, --timeout TIMEOUT
Time in seconds to wait for response.
-v, --verbose Turn on/off connector messages. Command output will show.
Still testing additional commands. Will update when they're functional.
Still a work in progess. Testing RCON access for another project I'm working on.
Have tested with successfully:
- ListPlayers -> Used by default if -c "COMMAND" and -b "BROADCAST_MESSAGE" are not present on the command line
- Broadcast
- SaveWorld
- DestroyWildDinos
- DoExit
You may or may not have all the maps listed in the config.ini deployed. Add/Remove from it as needed, then edit line 114 in asa_rcon_client.py
EXAMPLE: Removing maps config.init has:
[island]
addr=127.0.0.1
port=27015
pass=something
[scorched]
addr=127.0.0.1
port=27016
pass=sneaky
Change the choices[] list on line 114 from this:
parser.add_argument('-m', '--map', action='store', default='island', choices=['island', 'scorched', 'extinction', 'aberration', 'center', 'astraeos', 'ragnarok', 'all'], required=True, type=str, help='Map name from section in config.ini or "all" to execute on all maps')
To This:
parser.add_argument('-m', '--map', action='store', default='island', choices=['island', 'scorched', 'all'], required=True, type=str, help='Map name from section in config.ini or "all" to execute on all maps')
To Ch4r0ne, who wrote the original Python RCON Client Class Library.
Find it located here: python-rcon-client