By Ethereal, "third-party download tool" speed up the download in Mac OS X, or install the APP system

# ! / Bin / bash 
# ########################################### ################################################## 
# 2016 Nian 5 Yue 26 Ri 17: 37: 33: AsionTang 
# 1. in the first real machine installation software capture: Wireshark 
# 2. in the virtual machine in the Mac since taking the NAT network card, the card then monitor 
# 3. normal the App Store to install, update APP 
# 4. filter HTTP protocol Wireshark in 
# 5. locate the * .pkg * .pfpkg actual download address, then download the software by downloading a good 
# 6. Host then heard the following command to change to go through a local Http to 
# ############################################### ##############################################

#修改Host
#sudo nano /etc/hosts
#127.0.0.1    osxapps.itunes.apple.com

cd /Users/AsionTang/Desktop/l

# signed.dcr.8316301609370742707.pfpkg
mkdir -p ./apple-assets-us-std-000001/Purple20/v4/d0/bd/ad/d0bdadd7-5d95-e971-4ea6-2029906f0919

# hag2305506396569403268.pkg
mkdir -p ./apple-assets-us-std-000001/Purple30/v4/84/d0/63/84d06389-73d2-cb75-9b22-0d7037ffe1db

# ################################################# ############################################ 
# direct download XCode DMG package need to log in and download the Cookie settings with support tool, you can use a browser to directly download 
# 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
# macOS Sierra Direct Download from Apple Server
# https://7labs.heypub.com/tips-tricks/macos-sierra-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 folder
mkdir elCapitanRoot && cd elCapitanRoot

#create a folder structure to match apple server
sudo mkdir -p ./apple-assets-us-std-000001/Purple3/v4/74/d2/82/74d28291-9db9-7ae2-305d-9b8b3f5fd463/

#move downloaded pkg file to proper path
sudo mv ../ftk3252456602304584541.pkg ./apple-assets-us-std-000001/Purple3/v4/74/d2/82/74d28291-9db9-7ae2-305d-9b8b3f5fd463/

#start a web server when you are in "elCapitanRoot" folder
sudo python -m SimpleHTTPServer 80

#edit your mac's /etc/hosts file to add following line

sudo echo "127.0.0.1     osxapps.itunes.apple.com" >> /etc/hosts

#if you are 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 done, for "App Store" to work

 

Reproduced in: https: //www.cnblogs.com/AsionTang/p/5532093.html

Guess you like

Origin blog.csdn.net/weixin_33995481/article/details/93270836