Improved CurseForge API key checking.

Signed-off-by: sneedium <sneed@sneedmc.org>
This commit is contained in:
sneedium 2022-09-04 20:23:25 -04:00
parent 7addde4a40
commit 478ee95ffe
Signed by: sneedium
GPG Key ID: 906F66490FBE722F
2 changed files with 3 additions and 18 deletions

19
cf.sh
View File

@ -1,25 +1,10 @@
#!/bin/sh
# Copyleft (C) 2022 Chuckium
# Copyleft (C) 2022 Sneedium, Chuckium, & Fluchsneeden
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
command -v wscat &> /dev/null || { echo "YOU MUST HAVE wscat INSTALLED." 1>&2 && exit 1; }
wget -qO- https://curseforge.overwolf.com/downloads/curseforge-latest-linux.zip | funzip > cf.AppImage
chmod +x cf.AppImage
./cf.AppImage --appimage-extract &> /dev/null
squashfs-root/resources/plugins/curse/linux/Curse.Agent.Host &> /dev/null &
sleep 15
printf '{"type":"method","id":0,"name":"getSystemProperties","args":[]}' | timeout 2 wscat -i /dev/stdin -c ws://127.0.0.1:12345/CurseForge | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" | jq -r .result.data.Ak | tr -d '\n'
rm cf.AppImage &> /dev/null
rm -rf squashfs-root &> /dev/null
kill %1
curl -Ls https://fluchschmieden-entwickler-sind-alle.skids.lol/api | jq -r ".token" | tr -d '\n'

2
id.sh
View File

@ -15,4 +15,4 @@ cd ../../
echo -n $client_id
rm -rf mmc-stable-lin64.tar.gz MultiMC
rm -rf mmc-stable-lin64.tar.gz* MultiMC