1Conan / tsschecker

a powerful tool to check tss signing status of various devices and firmwares
GNU Lesser General Public License v3.0
60 stars 15 forks source link

not requesting update tickets when any long option (e.g --no-baseband) is passed on Windows #3

Closed DanTheMann15 closed 3 years ago

DanTheMann15 commented 3 years ago

when the Custom Server URL feature was added, it has caused a glitch that prevents tsschecker from also requesting update tickets when you pass the long option --no-baseband, even if you don't use --server-url.

how i discovered this bug is when i saved iOS 15.0 beta 2 blobs for my test device and noticing that tsschecker wasn't also requesting update tickets, i typically save shsh blobs without the baseband ticket since bbtickets are currently useless for the purpose of downgrading.

i am looking into this myself, but i need to make this known in-case anyone fixes it faster than i do. but i find it strange that only the long option is affected but not the short option.

DanTheMann15 commented 3 years ago

Update: this bug affects all long options, if you try requesting tickets using any long option it'll not request an update ticket.

Cryptiiiic commented 3 years ago
image

@DanTheMann15 I don't see the issue you are talking about, it requests an update ticket fine with long options. I'm confused why you have this issue.

DanTheMann15 commented 3 years ago

which platform are you testing your build on, it seems to be fine for you?

i can't test macOS since i don't have a mac, but i can test linux (Ubuntu) and sure enough it works perfectly on Ubuntu.

so it seems that Windows is affected. my build was compiled static using MSYS2 (x86_64-w64-mingw32). you can check out my latest build here on a Windows machine or VM: https://github.com/DanTheMann15/tsschecker/releases/tag/335-0

if you need a quickie script to dig deeper, you can use this script i s̶t̶o̶l̶e̶ borrowed from opa334 and modified: (remove the .txt part): tsschecker_build.sh.txt

Instructions:

Install MSYS2: https://www.msys2.org/ Install zsh (of course) pacman -S --needed zsh Switch over to MSYS2's MINGW64 console and run the script. ./build_tsschecker.sh static

It'll install the packages it needs (and ones it probably doesn't need) and start building tsschecker and it's dependencies.

you'll encounter an issue during compiling with "TSSCHECKER_VERSION_COUNT" and "TSSCHECKER_VERSION_SHA", when this happens to you just change it to 336-DEVELOPMENT or whatever you want (without the quotations) in tsschecker/main.c line 154.

i do not know why this happens.

compile parameters for tsschecker is: ./autogen.sh --host=x86_64-w64-mingw32 --enable-static --disable-shared make CFLAGS=-DCURL_STATICLIB LDFLAGS=-all-static -Wl,--allow-multiple-definition

DanTheMann15 commented 3 years ago

this is the error you will run into when attempting to compile: main.c:154:36: error: expected ‘)’ before ‘TSSCHECKER_VERSION_COUNT’ 154 | printf("tsschecker version: 0."TSSCHECKER_VERSION_COUNT"-"TSSCHECKER_VERSION_SHA"\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~ | ) make[2]: *** [Makefile:651: tsschecker-main.o] Error 1 make[2]: Leaving directory '/cygdrive/c/Users/Daniel/Desktop/Source/tsschecker/tsschecker' make[1]: *** [Makefile:408: all-recursive] Error 1 make[1]: Leaving directory '/cygdrive/c/Users/Daniel/Desktop/Source/tsschecker' make: *** [Makefile:340: all] Error 2

i just workaround it by removing the quotations from TSSCHECKER_VERSION_COUNT and TSSCHECKER_VERSION_SHA

the same "not requesting an update ticket" issue with tsschecker is also present when built with Cygwin. so both Cygwin and MSYS2 are affected.

1Conan commented 3 years ago

Not even related to any changes that I did. This occurs even on upstream.

DanTheMann15 commented 3 years ago

y̶o̶u̶ ̶m̶i̶g̶h̶t̶ ̶w̶a̶n̶t̶ ̶t̶o̶ ̶r̶e̶o̶p̶e̶n̶ ̶t̶h̶i̶s̶ ̶i̶s̶s̶u̶e̶, you closed this based on the TSSCHECKER_VERSION_COUNT/SHA issue which is bypassable.

the actual issue is tsschecker having problems saving update tickets along with the normal stuff when a long option is passed.

EDIT: just tested your build of tsschecker using the github ci, and the bug does not exist. damn... i'll read through the logs and learn from them. so as far as i can tell, this issue is solved.