3 Commits
v1.4.4 ... main

Author SHA1 Message Date
√(noham)²
1ae265b413 inject tvOS-compatible CydiaSubstrate instead of iOS 2026-06-20 17:22:34 +02:00
zx
740d3716dc chore: start satisfying Designated Requirement
the ipas are now more demure

this shouldnt break nor add anything i mean
2025-03-18 19:00:40 -04:00
zx
5ce7a0cb43 fix: unchecked @loader_path dependency
fuck this
2025-02-17 08:22:13 -05:00
10 changed files with 83 additions and 10 deletions

3
.gitignore vendored
View File

@@ -6,3 +6,6 @@ build/
*.cyan
.DS_Store
*.ipa
*.app/

View File

@@ -102,9 +102,13 @@ def main() -> None:
"--overwrite", action="store_true",
help="overwrite existing files without confirming"
)
parser.add_argument(
"--tv", action="store_true",
help="inject tvOS-compatible CydiaSubstrate instead of iOS"
)
parser.add_argument(
"--version", action="version", version="cyan v1.4.4"
"--version", action="version", version="cyan v1.4.5"
)
from cyan import logic

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>CydiaSubstrate</string>
<key>CFBundleIdentifier</key>
<string>ellekit</string>
<key>CFBundleName</key>
<string>ElleKit</string>
<key>CFBundleShortVersionString</key>
<string>1.1.3</string>
<key>CFBundleVersion</key>
<string>1.1.3</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
</dict>
</plist>

View File

@@ -0,0 +1,27 @@
Copyright (c) 2022 Évelyne Bélanger All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither ElleKit nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Binary file not shown.

View File

@@ -55,7 +55,7 @@ def main(parser: ArgumentParser) -> None:
app.remove_encrypted_extensions()
if args.f is not None:
app.executable.inject(args.f, tmpdir)
app.executable.inject(args.f, tmpdir, tvos=args.tv)
if args.n is not None:
app.plist.change_name(args.n)
if args.v is not None:

View File

@@ -14,7 +14,9 @@ class Executable:
idylib = f"{specific}/insert_dylib"
# adding /usr/lib/ now, idk why i didnt before. lets hope nothing breaks
starters = ("\t/Library/", "\t/usr/lib/", "\t@rpath", "\t@executable_path")
## LITERALLY 2 DAYS LATER. WHAT THE FUCK IS @LOADER_PATH HELP
## i will cry if only checking for '@' will break this.
starters = ("\t/Library/", "\t/usr/lib/", "\t@")
# substrate could show up as
# CydiaSubstrate.framework, libsubstrate.dylib, EVEN CydiaSubstrate.dylib

View File

@@ -24,7 +24,7 @@ class MainExecutable(Executable):
else:
self.inj_func = self.lief_inject
def inject(self, tweaks: dict[str, str], tmpdir: str) -> None:
def inject(self, tweaks: dict[str, str], tmpdir: str, tvos: bool = False) -> None:
ENT_PATH = f"{self.bundle_path}/cyan.entitlements"
PLUGINS_DIR = f"{self.bundle_path}/PlugIns"
FRAMEWORKS_DIR = f"{self.bundle_path}/Frameworks"
@@ -106,10 +106,19 @@ class MainExecutable(Executable):
real = self.common[missing]["name"] # e.g. "Orion.framework"
ip = f"{FRAMEWORKS_DIR}/{real}"
existed = tbhutils.delete_if_exists(ip, real)
shutil.copytree(f"{self.install_dir}/extras/{real}", ip)
if tvos and missing == "substrate.":
src = f"{self.install_dir}/extras/CydiaSubstrate_tvos.framework"
else:
src = f"{self.install_dir}/extras/{real}"
shutil.copytree(src, ip)
if not existed:
print(f"[*] auto-injected {real}")
if not tvos:
print(f"[*] auto-injected {real}")
else:
print(f"[*] auto-injected {real} (tvos)")
# FINALLY !!
if self.inj is not None: # type: ignore
@@ -137,9 +146,12 @@ class MainExecutable(Executable):
print("[!] failed to merge new entitlements, are they valid?")
def sign_with_entitlements(self, entitlements: str) -> bool:
return subprocess.run(
[self.ldid, f"-S{entitlements}", "-M", "-Cadhoc", self.path]
).returncode == 0
return subprocess.run([
self.ldid,
f"-S{entitlements}", "-M", "-Cadhoc",
f"-Q{self.install_dir}/extras/zero.requirements",
self.path
]).returncode == 0
def lief_inject(self, cmd: str) -> None:
if self.inj is None: # type: ignore

View File

@@ -4,7 +4,7 @@ from setuptools import setup
setup(
name="cyan",
version="1.4.4",
version="1.4.5",
description="finally, pyzule doesn't suck",
author="zx",
author_email="z@zxcvbn.fyi",