From 478ee95ffe0892a7b0fee0752860301fa3d3e073 Mon Sep 17 00:00:00 2001 From: sneedium Date: Sun, 4 Sep 2022 20:23:25 -0400 Subject: [PATCH] Improved CurseForge API key checking. Signed-off-by: sneedium --- cf.sh | 19 ++----------------- id.sh | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/cf.sh b/cf.sh index c1ca5a3a..124b94f9 100755 --- a/cf.sh +++ b/cf.sh @@ -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 . -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' diff --git a/id.sh b/id.sh index 248379c4..1b0f4cc6 100755 --- a/id.sh +++ b/id.sh @@ -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