fix: validate minimum version

This commit is contained in:
zx
2024-09-08 18:54:35 -04:00
parent 5c0363b5a9
commit 30fa189197
2 changed files with 9 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ more coming soon! i'm trying to copy pyzule in order to deprecate it in favor of
- inject deb, dylib, framework, bundle, and appex files/folders - inject deb, dylib, framework, bundle, and appex files/folders
- automatically fix dependencies on CydiaSubstrate **(cyan uses [ElleKit](https://github.com/evelyneee/ellekit/)!)**, Cephei*, and Orion - automatically fix dependencies on CydiaSubstrate **(cyan uses [ElleKit](https://github.com/evelyneee/ellekit/)!)**, Cephei*, and Orion
- copy any unknown file/folder types to app root - copy any unknown file/folder types to app root
- change app name, version, bundle id, and minimum os version
- remove UISupportedDevices - remove UISupportedDevices
- remove watch app - remove watch app
- fakesign the output ipa/app - fakesign the output ipa/app
@@ -45,5 +46,7 @@ then finally, to install or update cyan, just `pip install --force-reinstall git
[x] feat: plugin operations (-q, -e) [x] feat: plugin operations (-q, -e)
[] feat: change app icon
[] feat: .cyan files (lol rip .pyzule files) [] feat: .cyan files (lol rip .pyzule files)

View File

@@ -48,6 +48,12 @@ def validate_inputs(args: Namespace) -> Optional[str]:
print(f"[?] - {ne}") print(f"[?] - {ne}")
sys.exit(1) sys.exit(1)
if (
args.m is not None
and any(char not in "0123456789." for char in args.m)
):
sys.exit(f"[!] invalid OS version: {args.m}")
def get_app(path: str, tmpdir: str, is_ipa: bool) -> str: def get_app(path: str, tmpdir: str, is_ipa: bool) -> str:
payload = f"{tmpdir}/Payload" payload = f"{tmpdir}/Payload"