sneedmc/id.sh

19 lines
646 B
Bash
Raw Normal View History

2022-02-24 03:39:42 +00:00
#!/bin/sh
# Credit to Lenny for this script.
2022-02-24 03:39:42 +00:00
wget -q "https://files.multimc.org/downloads/mmc-stable-lin64.tar.gz"
2022-02-24 03:39:42 +00:00
tar xzf mmc-stable-lin64.tar.gz
#pushd MultiMC/bin
cd MultiMC/bin
client_id_asm=$(objdump -j '.text' --no-show-raw-insn -C --disassemble='Secrets::getMSAClientID(unsigned char)' MultiMC)
client_id="$(grep -oP '[a-z0-9]{2}(?=,%r[89]d)' <<< ${client_id_asm} | tac | tr -d '\n')$(grep -oP '(push.+0x)\K[a-z0-9]{2}' <<< ${client_id_asm} | tac | tr -d '\n')"
client_id="${client_id:0:8}-${client_id:8:4}-${client_id:12:4}-${client_id:16:4}-${client_id:20}"
#popd
cd ../../
echo -n $client_id
rm -rf mmc-stable-lin64.tar.gz MultiMC