Skip to content

Instantly share code, notes, and snippets.

View smartcmd's full-sized avatar
❤️
Hi!

daoge smartcmd

❤️
Hi!
  • China
  • 03:17 (UTC +08:00)
View GitHub Profile
@JustTalDevelops
JustTalDevelops / client_blob_cache_exploit.md
Last active May 17, 2024 10:52
Exploiting the Blob Cache in Bedrock Edition

Exploiting the Blob Cache in Minecraft: Bedrock Edition

...and why it matters.

Preface

You might have seen my HiveCorruptor plugin on Poggit. To be clear, I don't have a vendetta against The Hive or anything like that, the plugin was more so a comedic demonstration of how the blob cache can be exploited to crash clients. The next thing you're probably thinking is "how the hell does this work?" - and this is what this article will go over.

Introduction

@Kazzuk
Kazzuk / PingHandler.java
Last active July 15, 2023 08:13
Example implementation of MCBE server pinging
package org.example;
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.util.concurrent.Promise;
import org.cloudburstmc.netty.channel.raknet.RakPong;
import org.cloudburstmc.protocol.bedrock.BedrockPong;
import java.util.concurrent.ScheduledFuture;
@Alemiz112
Alemiz112 / PaletteHashTest.java
Last active June 28, 2024 07:45
Example implementation of Minecraft: Bedrock block state network hash computation
public class PaletteHashTest {
private static final int FNV1_32_INIT = 0x811c9dc5;
private static final int FNV1_PRIME_32 = 0x01000193;
public static void main(String[] args) throws Exception {
NbtMap blockState = NbtMap.builder()
.putString("name", "minecraft:bamboo_hanging_sign")
.putCompound("states", NbtMap.builder()
.putInt("facing_direction", 3)
@camullen
camullen / installation.md
Created December 10, 2022 23:52
KDE Install on WSL2
@valorad
valorad / InstallingXRDP.md
Created June 5, 2022 13:18
Installing xrdp

Ubuntu:

sudo apt install xrdp 
sudo adduser xrdp ssl-cert 
sudo systemctl restart xrdp

Fedora:

@Tomcc
Tomcc / client_blob_cache.md
Last active April 9, 2024 08:46
A description of the new Client Cache for server developers

Client Blob Cache

What's the Client Blob Cache

The Client Blob Cache is a new Bedrock optimization - it allows blocks and biomes to be cached on Clients to avoid resending identical chunks over and over. Chunks and biomes make up the vast majority of network traffic in a lot of common cases (eg. login, teleport or dimension switches) but at the same time, they rarely change. Allowing the Client to reuse chunks it has seen in the past can save a ton of traffic and latency!

The Client Cache is a Content Addressed Storage (a bit like git) that stores Blobs and retrieves them based on their full hashes (BlobIds). This means that the cache doesn't actually know about Chunks - in the future, we might start using it for more types of data, like skins or data driven entities.

A nice thing we get from the CAS approach is that the cache is persistent: returning players will be able to reuse content that was sent them in previous sessions or even previous sessions in different servers as long as tha

@roooodcastro
roooodcastro / GraphPanel.java
Last active May 24, 2024 15:40
A simple Swing component to draw a Graph over a regular JPanel. Features a grid, customizable amount of hatch marks, axis labels,checking for minimum and maximum value to label correctly the Y-axis and customizable padding and label padding. Based on "Hovercraft Full Of Eels"'s answer on StackOverflow (http://stackoverflow.com/questions/8693342/…
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.RenderingHints;
import java.awt.Stroke;
import java.util.ArrayList;