fix: #1391 Change http to https endpoints for macos download

This commit is contained in:
Agustin Isasmendi 2024-07-22 20:34:52 +02:00 committed by Martin Wimpress
parent c10ba9aac0
commit 9332ff25cd
1 changed files with 2 additions and 2 deletions

View File

@ -2021,14 +2021,14 @@ function get_macos() {
appleSession=$(curl -v -H "Host: osrecovery.apple.com" \ appleSession=$(curl -v -H "Host: osrecovery.apple.com" \
-H "Connection: close" \ -H "Connection: close" \
-A "InternetRecovery/1.0" http://osrecovery.apple.com/ 2>&1 | tr ';' '\n' | awk -F'session=|;' '{print $2}' | grep 1) -A "InternetRecovery/1.0" https://osrecovery.apple.com/ 2>&1 | tr ';' '\n' | awk -F'session=|;' '{print $2}' | grep 1)
info=$(curl -s -X POST -H "Host: osrecovery.apple.com" \ info=$(curl -s -X POST -H "Host: osrecovery.apple.com" \
-H "Connection: close" \ -H "Connection: close" \
-A "InternetRecovery/1.0" \ -A "InternetRecovery/1.0" \
-b "session=\"${appleSession}\"" \ -b "session=\"${appleSession}\"" \
-H "Content-Type: text/plain" \ -H "Content-Type: text/plain" \
-d $'cid='"$(generate_id 16)"$'\nsn='${MLB}$'\nbid='${BOARD_ID}$'\nk='"$(generate_id 64)"$'\nfg='"$(generate_id 64)"$'\nos='${OS_TYPE} \ -d $'cid='"$(generate_id 16)"$'\nsn='${MLB}$'\nbid='${BOARD_ID}$'\nk='"$(generate_id 64)"$'\nfg='"$(generate_id 64)"$'\nos='${OS_TYPE} \
http://osrecovery.apple.com/InstallationPayload/RecoveryImage | tr ' ' '\n') https://osrecovery.apple.com/InstallationPayload/RecoveryImage | tr ' ' '\n')
downloadLink=$(echo "$info" | grep 'oscdn' | grep 'dmg') downloadLink=$(echo "$info" | grep 'oscdn' | grep 'dmg')
downloadSession=$(echo "$info" | grep 'expires' | grep 'dmg') downloadSession=$(echo "$info" | grep 'expires' | grep 'dmg')
chunkListLink=$(echo "$info" | grep 'oscdn' | grep 'chunklist') chunkListLink=$(echo "$info" | grep 'oscdn' | grep 'chunklist')