Skip to content

Instantly share code, notes, and snippets.

@yushijinhun
Last active December 19, 2019 04:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yushijinhun/aca5be64237c28570f2a860a40364715 to your computer and use it in GitHub Desktop.
[shell]Download Minecraft skin
#!/bin/bash
name=$1
wget -O - $(curl --silent https://sessionserver.mojang.com/session/minecraft/profile/$(curl --silent -X POST -H 'Content-Type: application/json' --data "[\"$name\"]" https://api.mojang.com/profiles/minecraft|grep -Po '"id"\s*:\s*"\K[^"]+')|grep -Po '"value"\s*:\s*"\K[^"]+'|base64 -d|grep -Po '"SKIN"\s*:\s*{\s*"url"\s*:\s*"\K[^"]+')
./download-minecraft-skin.sh ZhaiShu | display
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment