Git Product home page Git Product logo

authlib-patcher's Introduction

authlib-patcher

License: LGPL v3

WHAT'S THIS?

This build script apply patches for Mojang's Minecraft authentication library authlib.

OBJECTIVE AND RESULT

OBJECTIVE

  • So that we can implement protocol translator which send skin data for PC users from BE servers.

RESULT

  • Skip skin url signature verification
  • Allow data scheme url for skin data

BRIEF HISTORY

When I was developping a PMMP plugin BigBrother which enable PC users to login to the BE server, I found some problem to convert player's skin data for PC users.

In Minecraft PC Edition, user's skin data is managed by Mojang's server, and the skin url is signed by Mojang's Yggdrasil session server's private key. We can obtain a public key from original authlib but it is hard to crack because the key-length is also 4096bit.

In addition the url must ends with '.minecraft.net' or '.mojang.com' because the whitelist domain is hard-coded in the authlib.

So, I decided to make some patches for authlib to bypass signature verification, and support data scheme url handler to pass users skin data as data url.

HOW THIS SCRIPT WORKS

This gradle script is work in this way.

  • Extract resources from the original authlib-1.5.25.jar to the directory src/main/resources
  • Decompile the original authlib-1.5.25.jar to the directory src/main/java
  • Apply all patches in the patch/ directory
  • Recompile all java source files in the directory src/main/java
  • Assemble jar files with compiled classes and resources files under the directory src/main/resources

โš  WARNING

This project it-self not containing any proprietary codes or resources, but when you run this build script, extracted resources and decompiled source codes are generated under the directory src/main.

And generated authlib-1.5.25.jar file also contains those resources or compiled classes from the decompiled source codes.

YOU MUST NOT REDISTRIBUTE EXTRACTED RESOURCES OR DECOMPILED SOURCE CODES OR GENERATED authlib-1.5.25.jar PLEASE USE THIS SOFTWRE AT YOUR OWN RISK

PREREQUISITE

  • You must have legal copy of minecraft PC (Java) version
  • You should run minecraft version 1.12.2 at least once
  • Install Oracle Java SE Development Kit 8+ (JDK 1.8+) or OpenJDK 1.8+
  • Install Gradle Build Tool

HOW TO BUILD

Just type the command follows.

user@locahost: ~/work/authlib$ gradle build

From now on, authlib-1.5.25.jar is generated under build/libs directory.

authlib-patcher's People

Contributors

eternalharvest avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

projetares

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.