• 在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发表的文章版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    ZCMU训练赛-H(模拟)
    ZCMU训练赛-B(dp/暴力)
    ZCMU训练赛-A(模拟)
    HDU 2045 LELE的RPG难题(递推)
    HDU 2044 一只小蜜蜂(递归)
    HDU 2050 折线分割平面(转)
    对递归的理解归纳(转)
    漫谈递归思想(转)
    2017中南大学暑期集训day1 : debug&STL-A
    探寻宝藏--河南省第六届大学生程序设计竞赛
  • 原文地址:https://www.cnblogs.com/AsionTang/p/5532093.html
Copyright © 2020-2023  润新知