Compare commits

...

3 commits

Author SHA1 Message Date
cgar 388ac991eb fix GetToken fast method 2023-10-16 23:28:40 +02:00
Dominika 70916a6f9c * lol curse 2022-06-21 01:57:03 +02:00
Dominika Liberda f9afbe6d28 * fix for paths with spaces
Co-Authored-By: pie3636 <pie3636@idk>
2022-05-26 00:47:57 +02:00
2 changed files with 14 additions and 8 deletions

View file

@ -4,11 +4,17 @@ if [[ -f token ]]; then
exit 0
fi
mkdir -p wrk; cd wrk
## slowwwwwww, but works
#mkdir -p wrk; cd wrk
curl -O https://curseforge.overwolf.com/downloads/curseforge-latest-linux.zip
7z -y x curseforge-latest-linux.zip
7z -y x *.AppImage
grep -Poh 'cfCoreApiKey":".*?"' resources/app/dist/desktop/desktop.js | sed 's/.*://;s/"//g' > ../token
#curl -L -O https://web.archive.org/web/20220519222137/https://curseforge.overwolf.com/downloads/curseforge-latest-linux.zip
#7z -y x curseforge-latest-linux.zip
#7z -y x *.AppImage
#grep -Poh 'cfCoreApiKey":".*?"' resources/app/dist/desktop/desktop.js | sed 's/.*://;s/"//g' > ../token
cd ..; rm -R wrk
#cd ..; rm -R wrk
## I've been reversing the new API key storage for a few hours and found out that you didn't change the token
## you can rickroll me all you'd like, it's not like I'll care ;3
curl https://arch.b4k.co/vg/thread/388569358 | grep -Po 'and put \K\$.*?(?= as)' > token

View file

@ -3,7 +3,7 @@ if [[ $1 == '' ]]; then
echo "usage: $0 <modpack.zip>"
exit 1
fi
token="$(dirname $(realpath $0))/token"
token="$(dirname "$(realpath $0)")/token"
meow="$(realpath $1)"
if [[ ! -f "$token" ]]; then
@ -23,7 +23,7 @@ if [[ ! -d mods ]]; then
proj=${line/,*/}
file=${line/*,/}
url="$(curl -s -H "x-api-key: $(cat $token)" \
url="$(curl -s -H "x-api-key: $(cat "$token")" \
"https://api.curseforge.com/v1/mods/$proj/files/$file" \
| jq -r '.data.downloadUrl')"
url_fix="$(sed 's/\[/%5b/g;s/\]/%5d/g;'"s/'/%27/g;s/ /%20/g" <<< "$url")" #' handling for bad URLs