6 Commits
v1.1 ... v1.1.2

Author SHA1 Message Date
zx
f5a5d7b5ed fix: sub-bundle detection 2024-09-10 17:23:30 -04:00
zx
c3a51e7e03 docs: update install instructions 2024-09-10 16:30:51 -04:00
zx
806db413e2 fix: crashing when jailbroken
i realized azule actually removes the signature (instead of fakesigning) before specific operations, maybe this is the fix?
2024-09-10 07:11:15 -04:00
zx
927df65b55 Merge branch 'main' of github.com:asdfzxcvbn/pyzule-rw 2024-09-09 19:37:24 -04:00
zx
851eedf629 fix: using wrong ldid 2024-09-09 19:36:38 -04:00
zx
126d17924b docs: feature requests 2024-09-09 10:32:34 -04:00
5 changed files with 24 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ cyan supports **linux, macOS, WSL, and jailbroken iOS!** all either x86_64 or ar
## features
more coming soon! i'm trying to copy pyzule in order to deprecate it in favor of cyan, which is 1000x better
you can open an issue to request a feature :D !!
- generate and use [shareable .cyan files](https://github.com/asdfzxcvbn/cyan-gen) to configure IPAs!
- inject deb, dylib, framework, bundle, and appex files/folders
@@ -26,11 +26,13 @@ first, make sure you have [ar](https://command-not-found.com/ar) and [tar](https
also obviously install python, version 3.9 or greater is required (the version available on the procursus repo for iOS)
**if you want to inject dylibs AND ARE NOT ON iOS,** make sure you install lief (you only have to do this once): `pip install -U lief`
1. install [pipx](https://github.com/pypa/pipx?tab=readme-ov-file#install-pipx)
2. install cyan: `pipx install https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip`
3. follow any instructions `pipx` may have given you, like `pipx ensurepath`
4. **if you want to inject dylibs and ARE NOT ON iOS**: `pipx inject cyan lief`
5. **if you want to change app icons (iOS NOT supported)**: `pipx inject cyan Pillow`
**if you want to change app icons (iOS NOT supported),** also make sure you install pillow: `pip install Pillow`
then finally, to install or update cyan, just `pip install --force-reinstall git+https://github.com/asdfzxcvbn/pyzule-rw.git#egg=cyan`
to *update*, just run step 2 again !
## acknowledgements

View File

@@ -95,7 +95,7 @@ def main() -> None:
)
parser.add_argument(
"--version", action="version", version="cyan v1.0"
"--version", action="version", version="cyan v1.1.2"
)
from cyan import logic

View File

@@ -76,7 +76,7 @@ class Executable:
has_entitlements = True
# iirc, injecting doesnt work (sometimes) if the file isn't signed
self.fakesign(False)
self.remove_signature()
if any(t.endswith(".appex") for t in tweaks):
os.makedirs(PLUGINS_DIR, exist_ok=True)
@@ -151,9 +151,12 @@ class Executable:
self.inj.write(self.path) # type: ignore
if has_entitlements:
subprocess.run(["ldid", f"-S{ENT_PATH}", self.path])
subprocess.run([self.ldid, f"-S{ENT_PATH}", self.path])
print("[*] restored entitlements")
def remove_signature(self) -> None:
subprocess.run([self.ldid, "-R", self.path], stderr=subprocess.DEVNULL)
def fakesign(self, keep_entitlements: bool = True) -> bool:
cmd = [self.ldid, "-S"]
if keep_entitlements:
@@ -195,7 +198,7 @@ class Executable:
)
def fix_dependencies(self, tweaks: dict[str, str], need: set[str]) -> None:
self.fakesign() # sometimes it doesnt work if we dont do this
self.remove_signature()
for dep in self.get_dependencies():
for cname in (tweaks | self.common):

View File

@@ -153,12 +153,16 @@ def extract_deb(deb: str, tweaks: dict[str, str], tmpdir: str) -> None:
for hi in sum((
glob(f"{t2}/**/*.dylib", recursive=True),
glob(f"{t2}/**/*.bundle", recursive=True),
glob(f"{t2}/**/*.appex", recursive=True),
glob(f"{t2}/**/*.bundle", recursive=True),
glob(f"{t2}/**/*.framework", recursive=True)
), []): # type: ignore
if os.path.islink(hi):
continue # symlinks are broken iirc
if (
os.path.islink(hi) # symlinks are broken iirc
or hi.count(".bundle") > 1 # prevent sub-bundle detection (rip)
or hi.count(".framework") > 1
):
continue
tweaks[os.path.basename(hi)] = hi

View File

@@ -1,8 +1,10 @@
# type: ignore
from setuptools import setup
setup(
name="cyan",
version="1.1",
version="1.1.2",
description="finally, pyzule doesn't suck",
author="zx",
author_email="zx@hrzn.email",