chore: beginning

This commit is contained in:
zx
2024-04-06 15:50:03 -04:00
parent 12ae026420
commit ab5eaff571
4 changed files with 29 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
__pycache__/

View File

@@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE. OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org> For more information, please refer to <https://unlicense.org>

View File

@@ -4,4 +4,4 @@ rewriting [pyzule](https://github.com/asdfzxcvbn/pyzule), but actually good this
this is pretty much just a hobby project that i'll work on when i'm bored. pyzule in its current state is kinda ugly, but it works and i haven't really had the motivation to work on it. there really isn't any need for improvements, anyway.. this is pretty much just a hobby project that i'll work on when i'm bored. pyzule in its current state is kinda ugly, but it works and i haven't really had the motivation to work on it. there really isn't any need for improvements, anyway..
`cyan` will target python v3.12 (finally!), be pep8-compliant (hopefully..), and be statically typed! `cyan` will target python v3.12 (finally!), be pep8-compliant (hopefully..), and be type-hinted!

26
cyan.py
View File

@@ -1 +1,27 @@
# cyan, aka pyzule-rw; by zx, 2024 # cyan, aka pyzule-rw; by zx, 2024
import os
import sys
import argparse
parser: argparse.ArgumentParser = argparse.ArgumentParser(
description="cyan, an azule \"clone\" for modifying iOS apps")
parser.add_argument("-o", metavar="output",
help="if unspecified, overwrites input")
parser.add_argument("-f", metavar="file", nargs="+",
help="a tweak to inject/item to be added to the bundle")
parser.add_argument("input", help="the app to be modified (.app/.ipa)")
args: argparse.Namespace = parser.parse_args()
INPUT: str = os.path.realpath(args.input)
WORKING_DIR: str = os.getcwd()
PZ_DIR: str = os.path.expanduser("~/.config/cyan")
changed: bool = False
if not (INPUT.endswith(".ipa") or INPUT.endswith(".app")):
sys.exit("[!] input must be a .ipa/.app")
elif not os.path.exists(INPUT):
sys.exit("[!] input does not exist")
elif not args.o and (input("[<] override your input file? [y/N] ").strip()
.lower() not in ("y", "yes")):
sys.exit("[!] not overriding input, missing -o")