#!/bin/bash###############################################################################################May 26, 2016 17:37:33:asiontang#1. First install the capture software on the real machine: Wireshark#2. In the virtual machine Mac because of the NAT network card, so listen to the network card#3. Install and update apps via the app Store normally#4. Filtering the HTTP protocol in Wireshark#5. Find *.pkg *.pfpkg Actual, then download the software by downloading the good#6. Then use the following command to listen to host changes to local HTTP can be###############################################################################################Modify Host#sudo nano/etc/hosts#127.0.0.1 osxapps.itunes.apple.comCD/users/asiontang/desktop/L#signed.dcr.8316301609370742707.pfpkgMkdir-p./apple-assets-us-std-000001/purple20/v4/d0/bd/ad/d0bdadd7-5d95-e971-4ea6-2029906f0919#hag2305506396569403268.pkgMkdir-p./apple-assets-us-std-000001/purple30/v4/84/d0/63/84d06389-73d2-cb75-9b22-0d7037ffe1db###############################################################################################Download the Xcode DMG package directly, log in and download it using the tool that supports cookies, otherwise you can only download it directly from the browser .#https://developer.apple.com/downloads/##Updating to Mac elcapitan using downloaded pkg file#https://gist.github.com/rahul286/2fc41942c7ed4039893f##OS X El Capitan Direct Download from Apple Server#https://7labs.heypub.com/tips-tricks/el-capitan-direct-download.html################################################################################################ based on Https://github.com/lioonline/OS-X-El-Capitan## pkg File link-http://osxapps.itunes.apple.com/apple-assets-us-std-000001/purple3/v4/74/d2/82/ 74d28291-9db9-7ae2-305d-9b8b3f5fd463/ftk3252456602304584541.pkg#Run This from folder where you have downloaded or copied ftk3252456602304584541.pkg file#Create a TMP foldermkdir Elcapitanroot &&CD Elcapitanroot#Create a folder structure to match Apple serversudo mkdir-p./apple-assets-us-std-000001/purple3/v4/74/d2/82/74d28291-9db9-7ae2-305d-9b8b3f5fd463/#Move downloaded pkg file to proper pathsudo mv. /ftk3252456602304584541.pkg./apple-assets-us-std-000001/purple3/v4/74/d2/82/ 74d28291-9db9-7ae2-305d-9b8b3f5fd463/#start a Web server when your is in "Elcapitanroot" foldersudo python-m simplehttpserver 80#Edit your Mac ' s/etc/hosts file to add following linesudo echo"127.0.0.1 osxapps.itunes.apple.com">>/etc/hosts#if you're in Rtcamp's office, you can try following LAN server#sudo echo "192.168.0.2 osxapps.itunes.apple.com" >>/etc/hosts#Open "app Store" app on Mac. and run update. #It should download pkg file from Local/lan server#important-remove/etc/hosts entry when do, for "App Store" to work
Speed up downloading, installing apps or systems on Mac OS X via grab, third-party download tools