8b56dcf4da9fcbffe5790a5d140a7e1b0c01cd46
DayZ RCON Client CLI
This Python script provides a Command Line Interface (CLI) for DayZ server owners to manage their servers using RCON (Remote Console) commands. The script reads server credentials from a credentials.json file and offers various features such as listing players, sending messages, locking/unlocking the server, kicking, and banning players.
Features and Usage
Initial Setup
- Credentials File:
- The script checks if
credentials.jsonexists. If not, it creates an example file that needs to be filled in with the server's actual details. - Example credentials in
credentials.json:{ "SERVER_ADDRESS": "YOUR-SERVER-ADDRESS", "SERVER_PORT": 2303, "RCON_PASSWORD": "RCON_PASSWORD" }
- The script checks if
Main Menu Options
- List players
- Messaging
- Locking
- Kicking
- Banning
- Exit
Detailed Features
-
List Players:
- Lists all the players currently connected to the server.
- Usage: Select option
1from the main menu.
-
Messaging:
- Sub-menu for messaging options:
1. Send Global Message 2. Send Direct Message 3. Back - Send Global Message:
- Sends a message to all players.
- Usage: Select option
2->1, then enter the message.
- Send Direct Message:
- Sends a message to a specific player.
- Usage: Select option
2->2, list players, enter the player number and the message.
- Sub-menu for messaging options:
-
Locking:
- Sub-menu for locking options:
1. Lock Server 2. Unlock Server 3. Back - Lock Server:
- Locks the server, preventing new players from joining.
- Usage: Select option
3->1.
- Unlock Server:
- Unlocks the server, allowing new players to join.
- Usage: Select option
3->2.
- Sub-menu for locking options:
-
Kicking:
- Sub-menu for kicking options:
1. Kick Single Player 2. Kick All Players 3. Back - Kick Single Player:
- Kicks a specific player from the server.
- Usage: Select option
4->1, list players, enter the player number and reason.
- Kick All Players (currently unoperational):
- Attempts to kick all players from the server.
- Usage: Select option
4->2.
- Sub-menu for kicking options:
-
Banning:
- Sub-menu for banning options:
1. Show Banlist 2. Ban Player 3. Ban Player by SteamID 4. Unban Player 5. Back - Show Banlist:
- Displays the list of banned players.
- Usage: Select option
5->1.
- Ban Player:
- Bans a specific player from the server.
- Usage: Select option
5->2, list players, enter the player number, ban time, and reason.
- Ban Player by SteamID:
- Bans a player by their SteamID.
- Usage: Select option
5->3, enter the SteamID, ban time, and reason.
- Unban Player:
- Removes a ban for a specific player.
- Usage: Select option
5->4, show banlist, enter the ban ID.
- Sub-menu for banning options:
-
Exit:
- Exits the CLI.
- Usage: Select option
6.
Roadmap
Future improvements planned for this CLI include:
- Saving player connection data into a database.
- Monitoring server activity and logging data for analytics.
Description
Languages
Python
100%