Browse Source

fix(mcbserver) better random and added comment

pull/3521/head
Clemens Mol 4 years ago
parent
commit
2f638478a8
No known key found for this signature in database GPG Key ID: 1D4F2AC5D22A1E37
  1. 4
      lgsm/functions/update_minecraft_bedrock.sh

4
lgsm/functions/update_minecraft_bedrock.sh

@ -6,7 +6,9 @@
# Description: Handles updating of Minecraft Bedrock servers.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
RandNum=$(echo $((1 + $RANDOM % 5000)))
#random number for userAgent
RandNum=$((1 + $RANDOM % 5000))
fn_update_minecraft_dl(){
latestmcbuildurl=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.$RandNum.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip')

Loading…
Cancel
Save