Metadata-Version: 2.1
Name: MCRP
Version: 0.1.6
Summary: Minecraft MITM proxy with function of rewriting packets, written in pure Python 3
Home-page: https://gitlab.com/seeklay/MCRP
Author: seeklay
Author-email: rudeboy@seeklay.icu
License: GNU General Public License v3.0
Download-URL: https://gitlab.com/seeklay/MCRP
Platform: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Intended Audience :: End Users/Desktop
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet
Description-Content-Type: text/markdown
Requires-Dist: cubelib (>=1.0.3-pre.1)
Requires-Dist: ruamel.yaml (==0.17.21)

# MCRP: Minecraft Rewrite Proxy

Minecraft MITM proxy with function of rewriting packets, written in pure [Python 3](https://www.python.org/).

![](https://img.shields.io/badge/Made%20with-Python-1f425f.svg) ![](https://img.shields.io/gitlab/license/seeklay/MCRP.svg) ![](https://tokei.rs/b1/gitlab/seeklay/MCRP) ![](https://badgen.net/gitlab/release/seeklay/MCRP) ![](https://badgen.net/pypi/v/MCRP) ![](https://img.shields.io/pypi/dw/MCRP?style=flat&logo=pypi)

## About

**MCRP** provides cool interface to interact with minecraft packets goes via proxy.

## Supported versions

>This note about **Play** state only! **Handshaking**, **Status**, **Login** fully supported and version-independent.

Absolutely Supported: Minecraft 1.8-1.8.9
Chat supported: Minecraft 1.12.2
For more information on supported protocols, visit the [cubelib](https://gitlab.com/seeklay/cubelib) page on gitlab, because protocol support lies with it.

## MCWP

> MineCraft Watching Proxy

MCWP is a python script written and distibuted with MCRP
It launching MCRP mitm proxy in back and setting global packet handlers to and from the server and then filtering packets with user-defined config and printing it's content in color.
*How to write filter configuration see in examples*

```bash
$> mcwp -h
 __  __   ____  ____   ____       __        __ ____
|  \/  | / ___||  _ \ |  _ \  _   \ \      / /|  _ \
| |\/| || |    | |_) || |_) |(_)   \ \ /\ / / | |_) |
| |  | || |___ |  _ < |  __/  _     \ V  V /  |  __/
|_|  |_| \____||_| \_\|_|    (_)     \_/\_/   |_| v0.1.4

usage: mcwp.py [-h] [-c config.yaml] [-v] [-l addr] [-u addr]

Minecraft Watching Proxy

optional arguments:
  -h, --help      show this help message and exit
  -c config.yaml  Path to YAML config file
  -v              If passed, enables verbose logging
  -l addr         Proxy listen addr [localhost:25565] (enclose ipv6 like [::])
  -u addr         Proxy upstream server addr [localhost:25575]
```
## Requirements

* Python 3 (tested and developed under `Python 3.7.9`)
* [cubelib](https://gitlab.com/seeklay/cubelib) >= 1.0.3-pre.1
* [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) == 0.17.21
## Installation

MCRP is published in [PyPI](https://pypi.org/project/cubelib/), so latest release can be installed with one simple command:
```bash
pip install -U mcrp
```

or bleeding edge from git sources (unstable) (may not work at all!):

```bash
git clone https://gitlab.com/seeklay/MCRP.git
cd mcrp/
pip3 install .
```
## Usage examples
```bash
$> mcwp -v
 __  __   ____  ____   ____       __        __ ____
|  \/  | / ___||  _ \ |  _ \  _   \ \      / /|  _ \
| |\/| || |    | |_) || |_) |(_)   \ \ /\ / / | |_) |
| |  | || |___ |  _ < |  __/  _     \ V  V /  |  __/
|_|  |_| \____||_| \_\|_|    (_)     \_/\_/   |_| v0.1.4

[01/26/2023 07:30:29 PM] [INFO] MCRP:  Running MCRP v0.1.4 (cubelib version 1.0.3)
[01/26/2023 07:30:29 PM] [INFO] MCRP:  Proxying config is: 127.0.0.1:25565 -> 127.0.0.1:25575
[01/26/2023 07:30:29 PM] [INFO] MCRP:  Registred direct handlers list[1]:
[01/26/2023 07:30:29 PM] [INFO] MCRP:      <class 'cubelib.proto.version_independent.ServerBound.Handshaking.Handshake'>
[01/26/2023 07:30:29 PM] [INFO] MCRP:  Registred relative handlers list[0]:

[01/26/2023 07:30:29 PM] [INFO] MCRP:  Waiting for client connection...
[01/26/2023 07:30:31 PM] [INFO] MCRP:  New client, creating connection to the server
[01/26/2023 07:30:31 PM] [INFO] MCRP:  Connected to the server
[01/26/2023 07:30:31 PM] [INFO] MCRP:  Reseting state to Handshaking
[01/26/2023 07:30:31 PM] [INFO] root:  ServerBound   Handshaking.Handshake(ProtoVer=47, ServerName='lc', ServerPort=25565, NextState=NextState.Status)
[01/26/2023 07:30:31 PM] [INFO] root:  ServerBound   Status.Request()
[01/26/2023 07:30:31 PM] [INFO] root:  ClientBound   Status.Response(JsonRsp='{"description":"A Minecraft Server","players":{"max":20,"online":0},"version":{"name":"Spigot 1.8.8","protocol":47}}')
[01/26/2023 07:30:31 PM] [INFO] root:  ServerBound   Status.Ping(Uniq=96003717)
[01/26/2023 07:30:31 PM] [INFO] root:  ClientBound   Status.Pong(Uniq=96003717)
[01/26/2023 07:30:31 PM] [INFO] MCRP:  Client disconnected
[01/26/2023 07:30:31 PM] [INFO] MCRP:  Server disconnected

[01/26/2023 07:30:31 PM] [INFO] MCRP:  Waiting for client connection...
```
See [**examples/**](examples/) for MCRP usage details

## Author
* [seeklay](https://gitlab.com/seeklay)

## License
**[GNU GPL 3.0](LICENSE)**


