
Product
A New Design for GitHub PR Comments
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.
This library provides a straightforward implementation of Minecraft's
Rcon protocol
_ in Python to provide a client for handling Remote Commands
(RCON) to a Minecraft server.
.. _Rcon protocol: http://wiki.vg/Rcon
Installation ############
The library is availble on PYPI and can be installed with pip::
pip install mcrcon
Usage
The recommend way to run this client is using the python 'with' statement. This ensures that the socket is correctly closed when you are done with it rather than being left open.
Example::
In [1]: from mcrcon import MCRcon
In [2]: with MCRcon("10.1.1.1", "sekret") as mcr:
...: resp = mcr.command("/whitelist add bob")
...: print(resp)
While you can use it without the 'with' statement, you have to connect manually, and ideally disconnect::
In [3]: mcr = MCRcon("10.1.1.1", "sekret")
In [4]: mcr.connect()
In [5]: resp = mcr.command("/whitelist add bob")
In [6]: print(resp)
In [7]: mcr.disconnect()
Command Line Usage ##################
After installing the package a cli will be included that can be used.
Help can be gotten by doing::
mcrcon --help
You can connect from the console with commands like the following::
mcrcon 10.1.1.1
You will either be prompted for your password, or you can set it as follows as an environment variable::
export RCON_PASSWORD=sekret
And then you can run commands on the server interactively::
> /whitelist add bob
FAQs
A client for handling Remote Commands (RCON) to a Minecraft server.
We found that mcrcon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.