#!/usr/bin/env python3 """Minimal RCON client for Minecraft server command injection.""" import socket, struct, sys, time def rcon(host, port, password, command, timeout=10): def packet(pid, ptype, body): b = body.encode() + b'\x00\x00' return struct.pack(' 1 else 'localhost' port = int(sys.argv[2]) if len(sys.argv) > 2 else 25575 password = sys.argv[3] if len(sys.argv) > 3 else 'benchpass' command = ' '.join(sys.argv[4:]) if len(sys.argv) > 4 else 'list' print(rcon(host, port, password, command))