zoukankan      html  css  js  c++  java
  • 在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
    # 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
    作者:Asion Tang
    凡是没有注明[转载]的文章,本Blog发表的文章版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    ROW_NUMBER()用法(转)
    winform MD5值生成
    VC使用“添加方法向导”添加调度映射方法“
    MyGeneration配置说明
    dataGridView取消自动生成列
    PHP魔术常量(magic constant)
    Eclipse添加DTD文件实现xml的自动提示功能
    Google:5个常见的SEO错误和6个SEO好主意
    PHP检查PEAR是否工作
    手把手教你在ubuntu上安装LAMP
  • 原文地址:https://www.cnblogs.com/AsionTang/p/5532093.html
Copyright © 2011-2022 走看看