返回
Featured image of post 我的世界正版账号的UUID和皮肤一键获取器

我的世界正版账号的UUID和皮肤一键获取器

获取UUID和皮肤再也不需要进入线上网站了只需要使用这个程序就能实现

目录

TL;DR / [极客简报]:

  • 身份识别:绕过网页端繁琐操作,通过Python直接调用Mojang API实现玩家UUID的精准提取。
  • 资产抓取:解析Base64编码的纹理元数据,一键下载并保存Minecraft玩家的原始皮肤镜像。
  • 代码逻辑:整合Requests请求与JSON解析链路,实现从用户名到本地WebP皮肤文件的自动化流转。

# 说明

本程序是一个用于获取我的世界玩家UUID和皮肤的程序,本程序兼容win7以上的运行

# 实际运行效果

效果

# source code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import requests
import json
import base64
import re
import urllib.request


def get_minecraft_skin():
     print("LEl_FENG blog.xpdbk.com Minecraft skin uuid crawler 1.0 <press enter to skip>")
     input()

     filename = input("The name of the skin image after saving: ")
     username = input("Please enter the genuine player username: ")

     # Check whether the username complies with Minecraft naming rules
     if not re.match("^[a-zA-Z0-9_]{3,16}$", username):
         print("Username does not comply with Minecraft naming rules")
         return

     try:
         response = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{username}")
         response.raise_for_status()
     except requests.exceptions.HTTPError as errh:
         print("Http Error:", errh)
         return
     except requests.exceptions.ConnectionError as errc:
         print("Error Connecting:", errc)
         return
     except requests.exceptions.Timeout as errt:
         print("Timeout Error:", errt)
         return
     except requests.exceptions.RequestException as err:
         print("Something went wrong", err)
         return

     data = response.json()

     uuid = data["id"]
     print(f"The UUID is {uuid}, do you want to get the skin? Press Enter to continue")
     input()

     try:
         response = requests.get(f"https://sessionserver.mojang.com/session/minecraft/profile/{uuid}")
         response.raise_for_status()
     except requests.exceptions.HTTPError as errh:
         print("Http Error:", errh)
         return
     except requests.exceptions.ConnectionError as errc:
         print("Error Connecting:", errc)
         return
     except requests.exceptions.Timeout as errt:
         print("Timeout Error:", errt)
         return
     except requests.exceptions.RequestException as err:
         print("Something went wrong", err)
         return

     data = response.json()

     base64_data = data["properties"][0]["value"]
     decoded_data = base64.b64decode(base64_data).decode('utf-8')
     skin_data = json.loads(decoded_data)

     skin_url = skin_data["textures"]["SKIN"]["url"]

     try:
         urllib.request.urlretrieve(skin_url, f"{filename}.webp")
     except Exception as e:
         print(f"Error occurred while saving the image: {e}")
         return

     print("Skin has been saved")


if __name__ == "__main__":
     get_minecraft_skin()

# I USE API?

YES!,I USE MOJANGAPI

# profiles api

id = uuid

https://api.mojang.com/users/profiles/minecraft/LEl_FENG

1
2
3
4
{
  "id" : "36b37464b4ec436aa4a643dabc20717a",
  "name" : "LEl_FENG"
}

# use uuid get skin

https://sessionserver.mojang.com/session/minecraft/profile/36b37464b4ec436aa4a643dabc20717a

1
2
3
4
5
6
7
8
9
{
  "id" : "36b37464b4ec436aa4a643dabc20717a",
  "name" : "LEl_FENG",
  "properties" : [ {
    "name" : "textures",
    "value" : "ewogICJ0aW1lc3RhbXAiIDogMTcxMDU4Nzc3MDk5MywKICAicHJvZmlsZUlkIiA6ICIzNmIzNzQ2NGI0ZWM0MzZhYTRhNjQzZGFiYzIwNzE3YSIsCiAgInByb2ZpbGVOYW1lIiA6ICJMRWxfRkVORyIsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS83NjQzY2M0YjUzNzNmYzU0MDE0NjZiN2M2ODMzYzZlNmNjZWJiM2RiOGIxZTAzYjQ0OTY1MjM1MGNkMTQxZDk1IiwKICAgICAgIm1ldGFkYXRhIiA6IHsKICAgICAgICAibW9kZWwiIDogInNsaW0iCiAgICAgIH0KICAgIH0KICB9Cn0="
  } ],
  "profileActions" : [ ]
}

Look Down

1
    "value" : "xxxxx"

The is Base64 You Can Decrypt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "timestamp" : 1710587770993,
  "profileId" : "36b37464b4ec436aa4a643dabc20717a",
  "profileName" : "LEl_FENG",
  "textures" : {
    "SKIN" : {
      "url" : "http://textures.minecraft.net/texture/7643cc4b5373fc5401466b7c6833c6e6ccebb3db8b1e03b449652350cd141d95",
      "metadata" : {
        "model" : "slim"
      }
    }
  }
}

url Is Skin You download is good