在Mac OS X 通过抓包“第三方下载工具”加速下载安装APP或系统
Posted Asion Tang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Mac OS X 通过抓包“第三方下载工具”加速下载安装APP或系统相关的知识,希望对你有一定的参考价值。
#!/bin/bash ############################################################################################## # 2016年5月26日 17:37:33:AsionTang # 1.先在真机安装抓包软件:Wireshark # 2.在虚拟机Mac里因为走的是NAT网卡,于是监听该网卡 # 3.正常通过App Store 安装、更新 APP # 4.在 Wireshark 里过滤 HTTP 协议 # 5.找到 *.pkg *.pfpkg实际下载地址,然后通过下载软件下载好 # 6.然后通过以下命令听过Host改走本地Http即可 ############################################################################################## #修改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 ############################################################################################## # 直接下载XCode DMG 包,需要登录,并用支持设置Cookie的工具下载,否则只能使用浏览器直接下载 # 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 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
以上是关于在Mac OS X 通过抓包“第三方下载工具”加速下载安装APP或系统的主要内容,如果未能解决你的问题,请参考以下文章
SSH客户端,FinalShell服务器管理,远程桌面加速软件,支持Windows,Mac OS X,Linux,版本2.6.3.1
SSH客户端,FinalShell服务器管理,远程桌面加速软件,支持Windows,Mac OS X,Linux,版本2.6.3.1,时间2017.12.10