From 159e4a44b7d09e35207521c9ec71d57783a84ad1 Mon Sep 17 00:00:00 2001 From: jens Date: Fri, 10 Sep 2021 19:32:45 +0000 Subject: [PATCH] Update 'download_xcode.rb' --- download_xcode.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/download_xcode.rb b/download_xcode.rb index 17c4d4a..2c25bf3 100644 --- a/download_xcode.rb +++ b/download_xcode.rb @@ -1,11 +1,13 @@ #!/usr/bin/env ruby -print "What is the URL of your Apple Downloads resource?\nURL:" +print "What is the URL of your Apple Downloads resource?\nYou should find this on https://developer.apple.com/download/ \nURL:" url = gets.strip print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: " token = gets.strip +print "Make sure you have aria2 installed (brew install aria2) " + command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads" exec(command)