├── tsschecker378.exe ├── README.md └── .github └── workflows └── save_shsh2.yml /tsschecker378.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/passengerKing/Github-Action-SHSH2/HEAD/tsschecker378.exe -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # autosave_SHSH2 2 | 使用 Actions 自动保存 shsh2. ([English Readme](#english-readme)) 3 | 4 | ## 使用说明 5 | 1. 点击右上角的 `Use this template` 以本仓库作为模版创建仓库(建议设为私有仓库). 6 | 2. 开启仓库的 actions 功能 7 | 3. 修改 [save_shsh2.yml](./.github/workflows/save_shsh2.yml) 文件中的各种变量 8 | 4. 享受自动运行的快乐。 9 | 10 | 11 | **本程序免费[开源](https://github.com/tom-snow/autosave_SHSH2),如果你从其他人那付费获得了 Github Action 自动保存 shsh2 的程序,那么恭喜你被骗了!** 12 | 13 | PS: 当前不会检查历史提交的 Release,也就是说会同一个设备&版本号&G值会有多个 shsh2 文件(文件名不同),文件内容应该完全相同的,不会影响使用。当前不打算修复,可能以后也不会去修复。 14 | 15 | ## 参数设置 16 | 注意:对于 A12/S4 及以上设备,你必须设置 `APNONCE` + `GEN` 变量,否则生成的 shsh2 将不可用。你可以在电脑通过数据线连接到你的苹果设备,然后打开 [blobsaver](https://github.com/airsquared/blobsaver/releases),点击 `Specify APNonce` 下的 `Read from device` 来固定与获取 `APNONCE` + `GEN` 变量。 17 | 18 | 其他参考: [tsschecker 帮助](https://github.com/1Conan/tsschecker#help) 19 | 20 |





21 | 22 | # English Readme 23 | Using actions save shsh2 automatically. 24 | 25 | ## Usage 26 | 1. Click `Use this template` to create a Repo for you (recommend private repo) 27 | 2. Enable actions 28 | 3. Modify [save_shsh2.yml](./.github/workflows/save_shsh2.yml) (The env block above) 29 | 4. Enjoy! 30 | 31 | ## ENVS 32 | Note: For Apple A12/S4 and newer device, you should set `APNONCE` + `GEN` variable. You can get it from [blobsaver](https://github.com/airsquared/blobsaver/releases). 33 | 34 | Other env: [tsschecker help](https://github.com/1Conan/tsschecker#help) 35 | -------------------------------------------------------------------------------- /.github/workflows/save_shsh2.yml: -------------------------------------------------------------------------------- 1 | name: Auto Save SHSH2 2 | permissions: write-all # Allow Release 允许发布 release 3 | env: 4 | ## --- required 5 | MODEL: iPhone8,1 # specify device by its model (eg. iPhone8,1) 6 | ECID: ab46efcbf71 # must be either DEC or HEX 7 | ## --- choosing one of these three below and comment others 8 | LATEST: true # if set true, FIRMWARE_VERSION and FIRMWARE_BUILD_ID will become invalid 9 | FIRMWARE_VERSION: 15.7 # specify firmware version 10 | # FIRMWARE_BUILD_ID: 19H12 # if set this, FIRMWARE_VERSION will become invalid 11 | ## --- 12 | NO_BOARDBAND: false # Request tickets without baseband. If set true, BOARDBAND will become invalid 13 | BOARDBAND: n71ap # recommend set this for iPhone 14 | ## --- 15 | GEN: "0x1111111111111111" # manually specify generator in format 0x%%16llx 16 | APNONCE: "" # required for saving blobs for A12/S4 and newer devices with generator 17 | ## --- Enable the following options to use beta firmware 18 | BETA: false 19 | ## --- Logging 20 | LOG_REQ: false # print the TSS request that will be sent to Apple 21 | LOG_RSP: false # print the TSS response that comes from Apple 22 | 23 | 24 | on: 25 | push: 26 | branches: 27 | - 'master' 28 | schedule: 29 | - cron: '20 5 * * 1' # Runs at 05:20 UTC on Mon. 30 | workflow_dispatch: 31 | inputs: 32 | args: 33 | description: 'Manual Arguments(Will use args here instead of using env. Use `--ecid` instead of `-e` if you get some error. Do not set `-s` and `--save-path`!)\n\n本程序免费开源,如果你从其他人那付费获得了 Github Action 自动保存 shsh2 的程序,那么恭喜你被骗了!' 34 | required: true 35 | default: "-d iPhone6,2 -B n53ap --ecid 6F40A4CD908 -l" 36 | 37 | jobs: 38 | save_shsh2: 39 | runs-on: windows-2022 40 | steps: 41 | - uses: actions/checkout@v2 42 | 43 | - name: prepare (auto) 44 | if: github.event.inputs == 0 45 | shell: bash 46 | run: | 47 | echo "Auto mode.\n本程序免费开源,如果你从其他人那付费获得了 Github Action 自动保存 shsh2 的程序,那么恭喜你被骗了!" 48 | tss_arg="" 49 | 50 | if [ -z "${{ env.MODEL }}" ] || [ -z "${{ env.ECID }}" ]; then 51 | echo "::error env.MODEL and env.ECID can't be NULL" 52 | exit 1 53 | fi 54 | if [ -z "${{ env.APNONCE }}" ]; then 55 | echo "::warning env.APNONCE is NULL, If you are using A12/S4 and newer, the blobs may not use. Read more: https://github.com/1Conan/tsschecker#nonce-entangling-apple-a12s4-and-newer" 56 | fi 57 | 58 | if [ -n "${{ env.MODEL }}" ]; then 59 | tss_arg=$tss_arg" -d "${{ env.MODEL }} 60 | fi 61 | if [ -n "${{ env.ECID }}" ]; then 62 | tss_arg=$tss_arg" --ecid "${{ env.ECID }} 63 | fi 64 | 65 | if [ "${{ env.LATEST }}" = "true" ] 66 | then 67 | tss_arg=$tss_arg" -l " 68 | elif [ -n "${{ env.FIRMWARE_BUILD_ID }}" ] 69 | then 70 | tss_arg=$tss_arg" -Z "${{ env.FIRMWARE_BUILD_ID }} 71 | else 72 | tss_arg=$tss_arg" -i "${{ env.FIRMWARE_VERSION }} 73 | fi 74 | 75 | if [ "${{ env.NO_BOARDBAND }}" = "true" ]; then 76 | tss_arg=$tss_arg" -b " 77 | else 78 | tss_arg=$tss_arg" -B "${{ env.BOARDBAND }} 79 | fi 80 | 81 | if [ -n "${{ env.GEN }}" ]; then 82 | tss_arg=$tss_arg" --generator "${{ env.GEN }} 83 | fi 84 | if [ -n "${{ env.APNONCE }}" ]; then 85 | tss_arg=$tss_arg" --apnonce "${{ env.APNONCE }} 86 | fi 87 | 88 | if [ "${{ env.BETA }}" = "true" ]; then 89 | tss_arg=$tss_arg" --ota --beta " 90 | fi 91 | 92 | if [ "${{ env.LOG_REQ }}" = "true" ]; then 93 | tss_arg=$tss_arg" --print-tss-request " 94 | fi 95 | if [ "${{ env.LOG_RSP }}" = "true" ]; then 96 | tss_arg=$tss_arg" --print-tss-response " 97 | fi 98 | 99 | tss_arg=$tss_arg" -s --save-path .\\blobs " 100 | 101 | echo tssArg="$tss_arg" >> $GITHUB_ENV 102 | 103 | 104 | - name: prepare (manually) 105 | if: github.event.inputs 106 | shell: bash 107 | run: | 108 | echo "Manually run.\n本程序免费开源,如果你从其他人那付费获得了 Github Action 自动保存 shsh2 的程序,那么恭喜你被骗了!" 109 | echo ECID=`echo "${{ github.event.inputs.args }}" | awk -F '--ecid' '{print $2}' | awk '{print $1}'` >> $GITHUB_ENV 110 | echo tssArg="${{ github.event.inputs.args }} -s --save-path .\\blobs" >> $GITHUB_ENV 111 | 112 | - name: run tsschecker 113 | shell: pwsh 114 | run: | 115 | if(!(Test-Path "blobs")) { mkdir "blobs" } 116 | echo ${{ env.tssArg }} "\n本程序免费开源,如果你从其他人那付费获得了 Github Action 自动保存 shsh2 的程序,那么恭喜你被骗了!" 117 | .\\tsschecker378.exe ${{ env.tssArg }} 118 | 119 | - name: get info 120 | id: shsh2-info 121 | shell: bash 122 | run: | 123 | output=`ls blobs` 124 | if [ -z $output ]; then 125 | echo "blobs folder is empty!" 126 | exit 1 127 | fi 128 | firmware=`echo ${output} | awk -F '_' '{print $4}'` 129 | echo firmware="${firmware}" >> $GITHUB_OUTPUT 130 | 131 | echo nonce=`echo ${output} | awk -F '_' '{print $5}' | awk -F '.' '{print $1}'` >> $GITHUB_OUTPUT 132 | 133 | echo model=`echo ${output} | awk -F '_' '{print $2}'` >> $GITHUB_OUTPUT 134 | 135 | echo tagName="${firmware}" >> $GITHUB_OUTPUT 136 | 137 | mv "./blobs/"$output "./blobs/"`date +"%Y-%m-%d"`"_"$output 138 | 139 | echo artifactName=$output >> $GITHUB_OUTPUT 140 | 141 | - uses: actions/upload-artifact@v2 142 | with: 143 | name: steps.shsh2-info.outputs.artifactName 144 | path: blobs/* 145 | 146 | - name: Release 147 | uses: softprops/action-gh-release@v1 148 | if: ${{ success() }} 149 | with: 150 | tag_name: ${{ steps.shsh2-info.outputs.tagName }} 151 | body: >- 152 | ${{ format(fromJSON('"ecid: {0}\nmodel: {1}\nfirmware: {2}\nnonce: {3}\n\n\n本程序免费[开源](https://github.com/tom-snow/autosave_SHSH2),如果你从其他人那付费获得了 Github Action 自动保存 shsh2 的程序,那么恭喜你被骗了!"'), 153 | env.ECID, 154 | steps.shsh2-info.outputs.model, 155 | steps.shsh2-info.outputs.firmware, 156 | steps.shsh2-info.outputs.nonce 157 | ) }} 158 | files: blobs/* 159 | --------------------------------------------------------------------------------