Update 'download_xcode.rb'
This commit is contained in:
parent
85aee01979
commit
159e4a44b7
|
@ -1,11 +1,13 @@
|
||||||
#!/usr/bin/env ruby
|
#!/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
|
url = gets.strip
|
||||||
|
|
||||||
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
|
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
|
||||||
token = gets.strip
|
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"
|
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)
|
exec(command)
|
||||||
|
|
Loading…
Reference in New Issue