Skip to content

Instantly share code, notes, and snippets.

View Rabbit0w0's full-sized avatar

CookedBunny Rabbit0w0

  • Nowhere
  • 23:11 (UTC +08:00)
View GitHub Profile
@Rabbit0w0
Rabbit0w0 / swfreeze.go
Created December 14, 2024 14:07
swfreeze.go
package main
/*
#cgo CFLAGS: -g -Wall
#include <stdlib.h>
*/
import "C"
import (
"bytes"
"encoding/json"
@Rabbit0w0
Rabbit0w0 / example.rs
Created September 7, 2024 11:21
Generate offline UUID for Minecraft player in Rust
use md5::{Md5, Digest};
use std::fmt::Write;
fn build_uuid(username: &str) -> String {
let mut hasher = Md5::new();
hasher.update(format!("OfflinePlayer:{}", username).as_bytes());
let result = hasher.finalize();
let mut data = result.into_iter().collect::<Vec<u8>>();