From 51a65423b89b50dc8d16e5546ce81c6705bb56ad Mon Sep 17 00:00:00 2001 From: Liam <33645555+lj3954@users.noreply.github.com> Date: Sat, 30 Mar 2024 00:15:15 -0700 Subject: [PATCH] Replace firefox 100 useragent with approximated latest release --- Mido.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mido.sh b/Mido.sh index 9b517d0..ff5f6a5 100755 --- a/Mido.sh +++ b/Mido.sh @@ -320,7 +320,10 @@ consumer_download() { 8 | 10) url="${url}ISO" ;; esac - user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" + # Determine approximate latest Firefox release, using Mozilla's 4 week release schedule & the midnight after the release of Firefox 124 + firefox_release="$((124 + ($(date +%s) - 1710892800) / 2419200))" + + user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:${firefox_release}.0) Gecko/20100101 Firefox/${firefox_release}.0" # uuidgen: For MacOS (installed by default) and other systems (e.g. with no /proc) that don't have a kernel interface for generating random UUIDs session_id="$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random)"