Revisions
-
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ sed 's/.*action="\(.*\)".*/\1/' ) wosid=$( echo $postDestination | sed 's/.*wo\/\([a-zA-Z0-9]*\).*/\1/' ) # Post to destination... curl -L -s -o /dev/null -A "$userAgent" -b ~/.cookiejar -c ~/.cookiejar -X 'POST' -d "theAccountName=$login&theAccountPW=$password&1.Continue.x=0&1.Continue.y=0&theAuxValue&wosid=$wosid" "https://daw.apple.com$postDestination" # Curl the dmg... curl -L -A "$userAgent" -b ~/.cookiejar -c ~/.cookiejar -O 'https://developer.apple.com/devcenter/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg' -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ sed 's/.*action="\(.*\)".*/\1/' ) wosid=$( echo $postDestination | sed 's/.*wo\/\([a-zA-Z0-9]*\).*/\1/' ) # Post to destination... curl -Lvs -o /dev/null -A "$userAgent" -b ~/.cookiejar -c ~/.cookiejar -X 'POST' -d "theAccountName=$login&theAccountPW=$password&1.Continue.x=0&1.Continue.y=0&theAuxValue&wosid=$wosid" "https://daw.apple.com$postDestination" # Curl the dmg... curl -L -A "$userAgent" -b ~/.cookiejar -c ~/.cookiejar -O 'https://developer.apple.com/devcenter/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg' -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 5 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,9 @@ #!/bin/bash # This snippet should hypothetically allow a totally unattended # installation of Apple's XCode. After prompting for credentials, # the script simulates a login, begins a download and subsequently # mounts the disk image and installs XCode to the default location. echo -n "ADC login: " read login -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 9 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,10 +21,12 @@ echo -n "ADC login: " read login echo -n "ADC password: " read -s password touch ~/.cookiejar userAgent='Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5' # Curl to grab destination URL... postDestination=$( \ curl -b ~/.cookiejar -c ~/.cookiejar -s https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620 | \ @@ -35,13 +37,14 @@ sed 's/.*action="\(.*\)".*/\1/' ) wosid=$( echo $postDestination | sed 's/.*wo\/\([a-zA-Z0-9]*\).*/\1/' ) # Post to destination... curl -L -A "$userAgent" -b ~/.cookiejar -c ~/.cookiejar -s -X 'POST' -d "theAccountName=$login&theAccountPW=$password&1.Continue.x=0&1.Continue.y=0&theAuxValue&wosid=$wosid" "https://daw.apple.com$postDestination" # Curl the dmg... curl -L -A "$userAgent" -b ~/.cookiejar -c ~/.cookiejar -O 'https://developer.apple.com/devcenter/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg' rm ~/.cookiejar hdiutil attach ./xcode_3.2.5_and_ios_sdk_4.2_final.dmg cd /Volumes/xc* installer -pkg ./XcodeTools.mpkg -target / hdiutil detach /Volumes/xc* -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 4 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,22 +27,20 @@ touch ~/.cookiejar # Curl to grab destination URL... postDestination=$( \ curl -b ~/.cookiejar -c ~/.cookiejar -s https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620 | \ egrep '<form' | \ sed 's/.*action="\(.*\)".*/\1/' ) # Sed to extract wosid... wosid=$( echo $postDestination | sed 's/.*wo\/\([a-zA-Z0-9]*\).*/\1/' ) # Post to destination... curl -b ~/.cookiejar -c ~/.cookiejar -X 'POST' -d 'theAccountName=$login&theAccountPW=$password&1.Continue.x=0&1.Continue.y=0&theAuxValue&wosid=$wosid' $postDestination # Curl the dmg... while ! curl -b ~/.cookiejar -c ~/.cookiejar -C - -O 'http://adcdownload.apple.com/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg'; do sleep 10; done hdiutil attach ./xcode_3.2.5_and_ios_sdk_4.2_final.dmg cd /Volumes/xcode installer -pkg ./XcodeTools.mpkg -target / hdiutil detach /Volumes/xcode -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,8 +26,13 @@ read password touch ~/.cookiejar # Curl to grab destination URL... postDestination=$( \ curl -s https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620 | \ egrep '<form' | \ sed 's/.*action="\(.*\)".*/\1/' ) # Sed to extract wosid... wosid=$( echo $postDestination | sed 's/.*wo\/\([a-zA-Z0-9]*\).*/\1/' ) # Post to destination... # curl -X 'POST' -d 'theAccountName=$login&theAccountPW=$password&1.Continue.x=0&1.Continue.y=0&theAuxValue&wosid=$wosid' \ -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 18 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,10 @@ #!/bin/bash # # Grab get session ID: # wosid=$( \ # curl -b ~/.cookiejar -c ~/.cookiejar -s https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620 | \ # egrep 'input type="hidden" name="wosid"' | \ # sed 's/.*value="\([A-Za-z0-9]*\)".*/\1/' ) # # Post destination should look like this: # https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/394/wo/MmEWA4c7HEptDbo5HCeDpg/0.3.3.1.1.2.1.1.3.1.1 @@ -14,16 +17,24 @@ # theAuxValue # wosid MmEWA4c7HEptDbo5HCeDpg # echo -n "ADC login: " read login echo -n "ADC password: " read password touch ~/.cookiejar # Curl to grab destination URL... # Sed to extract wosid... # Post to destination... # curl -X 'POST' -d 'theAccountName=$login&theAccountPW=$password&1.Continue.x=0&1.Continue.y=0&theAuxValue&wosid=$wosid' \ "https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/394/wo/$wosid/0.3.3.1.1.2.1.1.3.1.1" # Curl the dmg... # while ! curl -C - -O 'http://path.to.dmg'; do sleep 10; done wget --no-check-certificate http://adcdownload.apple.com/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg -o ~/.xcode.dmg hdiutil attach ~/.xcode.dmg -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,10 @@ # 1.Continue.y 0 # theAuxValue # wosid MmEWA4c7HEptDbo5HCeDpg # # Useful regex's: # /<input type="hidden" name="wosid" value="([A-Za-z0-9]+)" \/>/ # echo -n "ADC login: " read login -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 21 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,26 @@ #!/bin/bash # Current caveat: requires manual login to Apple Developer Center... # Curl here to get session ID and POST destination: # https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620&path=%2F%2Fdevcenter%2Fios%2Findex.action # # Post destination should look like this: # https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/394/wo/MmEWA4c7HEptDbo5HCeDpg/0.3.3.1.1.2.1.1.3.1.1 # # Post parameters look like this (wosid is session ID): # theAccountName [email protected] # theAccountPW <PASSWORD HERE> # 1.Continue.x 0 # 1.Continue.y 0 # theAuxValue # wosid MmEWA4c7HEptDbo5HCeDpg echo -n "ADC login: " read login echo -n "ADC password: " read password curl -X "POST" -d "theAccountName=$login&theAccountPW=$password&1.Continue.x=0&1.Continue.y=0&theAuxValue&wosid=MmEWA4c7HEptDbo5HCeDpg" https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/394/wo/MmEWA4c7HEptDbo5HCeDpg/0.3.3.1.1.2.1.1.3.1.1 wget --no-check-certificate http://adcdownload.apple.com/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg -o ~/.xcode.dmg hdiutil attach ~/.xcode.dmg cd /Volumes/xcode -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ #!/bin/bash # Current caveat: requires manual login to Apple Developer Center... wget --no-check-certificate http://adcdownload.apple.com/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg -o ~/.xcode.dmg hdiutil attach ~/.xcode.dmg cd /Volumes/xcode -
Christopher Joel revised this gist
Feb 9, 2011 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,7 @@ // Current caveat: requires manual login to Apple Developer Center... wget --no-check-certificate http://adcdownload.apple.com/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg -o ~/.xcode.dmg hdiutil attach ~/.xcode.dmg cd /Volumes/xcode installer -pkg ./XcodeTools.mpkg -target / hdiutil detach /Volumes/xcode rm ~/.xcode.dmg -
Christopher Joel created this gist
Feb 9, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ installer -pkg ./XcodeTools.mpkg -target /