Add Minecraft/Bedrock/get_bedrock_url.sh
This commit is contained in:
		
							parent
							
								
									ccdce4d08b
								
							
						
					
					
						commit
						a7b58c571b
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								Minecraft/Bedrock/get_bedrock_url.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Minecraft/Bedrock/get_bedrock_url.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -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
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue