Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
388ac991eb | |||
Dominika | 70916a6f9c | ||
Dominika Liberda | f9afbe6d28 |
18
getToken.sh
18
getToken.sh
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue