diff --git a/Minecraft/Bedrock/get_bedrock_url.sh b/Minecraft/Bedrock/get_bedrock_url.sh new file mode 100644 index 0000000..0c281ac --- /dev/null +++ b/Minecraft/Bedrock/get_bedrock_url.sh @@ -0,0 +1,15 @@ +#!/bin/bash +#ClayGarth.com + +# Must be done from residential IP +# Use curl to fetch the web page +url="https://www.minecraft.net/en-us/download/server/bedrock" # Replace with the actual URL of the website +user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36" +page_content=$(curl -s -A "$user_agent" "$url") + +# Use grep to find the URL containing "/bin-linux/" and ending with ".zip" +download_url=$(echo "$page_content" | grep -oE 'https://[^"]*/bin-linux/[^"]*\.zip') +echo $download_url > bedrock_url.txt +scp -P 22 /home/clay/bedrock_url.txt url@ip:/home/bedrock/bedrock_url.txt + +exit