tsschecker icon indicating copy to clipboard operation
tsschecker copied to clipboard

Please add an option to skip requesting blobs when already saved

Open waja opened this issue 8 years ago • 3 comments

It would be helpful to add an option to skip requesting the blobs when the file is already present in the save path.

Many thanks.

waja avatar Jan 05 '17 22:01 waja

that option is technically already available if you specify the blob with -i instead of -l

2Klasic avatar Jan 05 '17 23:01 2Klasic

that option is technically already available if you specify the blob with -i instead of -l

Which pulls a specified iOS version.

If you call it with -l (e.g. periodically) over a significant amount of ECIDs to check for new signable blobs and download only new once, that would help a lot.

waja avatar Jan 06 '17 00:01 waja

The idea isn't bad, but i kinda have the feeling that it'll be quite hard implementing this. I'm not sure whether this problem arised from the many commits made after you opened this issue or if this was kind of a problem from the beginning, but the current situation is that quite a lot information is stored in the filename for convinience and for making organizing a whole lof of shsh files a bit easier.

Consider this basic example:

tihms-MBP:Desktop tihmstar$ tsschecker -d iPhone6,2 -l -s
Version: 37883e9d4c6cea6235f7c0dc87d5435f35098a42 - 215
[TSSC] opening firmware.json
[JSON] counting elements
[JSON] parsing elements
[TSSC] selecting latest iOS: 10.3
[TSSC] got firmwareurl for iOS 10.3 build 14E277
[TSSC] opening Buildmanifest for iPhone6,2_10.3_14E277
[TSSR] Request URL set to https://gs.apple.com/TSS/controller?action=2
[TSSR] Sending TSS request attempt 1... success
also requesting APTicket for installType=Update
[TSSR] Request URL set to https://gs.apple.com/TSS/controller?action=2
[TSSR] Sending TSS request attempt 1... success
Saved shsh blobs!
iOS 10.3 14E277 IS signed!

iOS 10.3 for device iPhone6,2 IS being signed!
tihms-MBP:Desktop tihmstar$ ls -l *.shsh2
-rw-r--r--  1 tihmstar  staff  55041 29 Mär 14:36 7971402401278245_iPhone6,2_10.3-14E277_f27c520438cf1cd3605564b650275e45062e2cd5.shsh2

So a very simple command with very few information yields in the filename 7971402401278245_iPhone6,2_10.3-14E277_f27c520438cf1cd3605564b650275e45062e2cd5.shsh2 which is constructed as following: ECID_MODEL_IOSNUMVERSION-IOSBUILDVERSION_APNONCE.ENDING Where ENDING is "shsh2" if the file either contains a generator or contains two tickes (which is both true in our case) or "shsh" if neither is the case.

The problem is that most values are computed during the process of generating the actual request, so it won't be possible to skip that step (which is most of the computation). The only step that one actually could skip is sending the request to apple once it's been constructed, but that's (in case you're not on really really crappy internet) not really time consuming. So i'm not really sure whether it make sense to implement this at all, because there isn't really that much time saved. Also since the generator is randomly chosen each time, the APNonce at the end of the filename would change each time anyways.

I guess best approach solving this would be to create a little bash script, which checks for ecid,device and ios version and see if any file can be found and if not, just request the ticket.

tihmstar avatar Mar 29 '17 12:03 tihmstar