Skip to content

Commit b66999d

Browse files
author
hackcatml
committed
add mldecrypt application
1 parent ffdd748 commit b66999d

75 files changed

Lines changed: 4084 additions & 53 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Info.plist

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDisplayName</key>
6+
<string>mldecrypt</string>
7+
<key>CFBundleURLTypes</key>
8+
<array>
9+
<dict>
10+
<key>CFBundleURLName</key>
11+
<string>com.hackcatml.mldecryptapp</string>
12+
<key>CFBundleURLSchemes</key>
13+
<array>
14+
<string>mldecryptapp</string>
15+
</array>
16+
</dict>
17+
</array>
18+
<key>CFBundleExecutable</key>
19+
<string>mldecryptapp</string>
20+
<key>CFBundleIcons</key>
21+
<dict>
22+
<key>CFBundlePrimaryIcon</key>
23+
<dict>
24+
<key>CFBundleIconFiles</key>
25+
<array>
26+
<string>AppIcon20x20</string>
27+
<string>AppIcon29x29</string>
28+
<string>AppIcon40x40</string>
29+
<string>AppIcon57x57</string>
30+
<string>AppIcon60x60</string>
31+
</array>
32+
<key>CFBundleIconName</key>
33+
<string>AppIcon</string>
34+
</dict>
35+
</dict>
36+
<key>CFBundleIcons~ipad</key>
37+
<dict>
38+
<key>CFBundlePrimaryIcon</key>
39+
<dict>
40+
<key>CFBundleIconFiles</key>
41+
<array>
42+
<string>AppIcon29x29</string>
43+
<string>AppIcon40x40</string>
44+
<string>AppIcon57x57</string>
45+
<string>AppIcon60x60</string>
46+
<string>AppIcon50x50</string>
47+
<string>AppIcon72x72</string>
48+
<string>AppIcon76x76</string>
49+
</array>
50+
<key>CFBundleIconName</key>
51+
<string>AppIcon</string>
52+
</dict>
53+
</dict>
54+
<key>CFBundleIdentifier</key>
55+
<string>com.hackcatml.mldecryptapp</string>
56+
<key>CFBundleInfoDictionaryVersion</key>
57+
<string>6.0</string>
58+
<key>CFBundlePackageType</key>
59+
<string>APPL</string>
60+
<key>CFBundleSupportedPlatforms</key>
61+
<array>
62+
<string>iPhoneOS</string>
63+
</array>
64+
<key>CFBundleVersion</key>
65+
<string>1.0</string>
66+
<key>LSRequiresIPhoneOS</key>
67+
<true/>
68+
<key>UIDeviceFamily</key>
69+
<array>
70+
<integer>1</integer>
71+
<integer>2</integer>
72+
</array>
73+
<key>UIRequiredDeviceCapabilities</key>
74+
<array>
75+
<string>armv7</string>
76+
</array>
77+
<key>UILaunchImageFile</key>
78+
<string>LaunchImage</string>
79+
<key>UILaunchImages</key>
80+
<array>
81+
<dict>
82+
<key>UILaunchImageMinimumOSVersion</key>
83+
<string>7.0</string>
84+
<key>UILaunchImageName</key>
85+
<string>LaunchImage</string>
86+
<key>UILaunchImageOrientation</key>
87+
<string>Portrait</string>
88+
<key>UILaunchImageSize</key>
89+
<string>{320, 480}</string>
90+
</dict>
91+
<dict>
92+
<key>UILaunchImageMinimumOSVersion</key>
93+
<string>7.0</string>
94+
<key>UILaunchImageName</key>
95+
<string>LaunchImage-700-568h</string>
96+
<key>UILaunchImageOrientation</key>
97+
<string>Portrait</string>
98+
<key>UILaunchImageSize</key>
99+
<string>{320, 568}</string>
100+
</dict>
101+
<dict>
102+
<key>UILaunchImageMinimumOSVersion</key>
103+
<string>7.0</string>
104+
<key>UILaunchImageName</key>
105+
<string>LaunchImage-Portrait</string>
106+
<key>UILaunchImageOrientation</key>
107+
<string>Portrait</string>
108+
<key>UILaunchImageSize</key>
109+
<string>{768, 1024}</string>
110+
</dict>
111+
<dict>
112+
<key>UILaunchImageMinimumOSVersion</key>
113+
<string>8.0</string>
114+
<key>UILaunchImageName</key>
115+
<string>LaunchImage-800-667h</string>
116+
<key>UILaunchImageOrientation</key>
117+
<string>Portrait</string>
118+
<key>UILaunchImageSize</key>
119+
<string>{375, 667}</string>
120+
</dict>
121+
<dict>
122+
<key>UILaunchImageMinimumOSVersion</key>
123+
<string>8.0</string>
124+
<key>UILaunchImageName</key>
125+
<string>LaunchImage-800-Portrait-736h</string>
126+
<key>UILaunchImageOrientation</key>
127+
<string>Portrait</string>
128+
<key>UILaunchImageSize</key>
129+
<string>{414, 736}</string>
130+
</dict>
131+
</array>
132+
<key>UISupportedInterfaceOrientations</key>
133+
<array>
134+
<string>UIInterfaceOrientationPortrait</string>
135+
<string>UIInterfaceOrientationLandscapeLeft</string>
136+
<string>UIInterfaceOrientationLandscapeRight</string>
137+
</array>
138+
<key>UISupportedInterfaceOrientations~ipad</key>
139+
<array>
140+
<string>UIInterfaceOrientationPortrait</string>
141+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
142+
<string>UIInterfaceOrientationLandscapeLeft</string>
143+
<string>UIInterfaceOrientationLandscapeRight</string>
144+
</array>
145+
</dict>
146+
</plist>

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ THEOS_PACKAGE_SCHEME = rootless
2626
endif
2727

2828
# Define included files, imported frameworks, etc.
29+
## mldecrypt tool
2930
TOOL_NAME = mldecrypt
3031
$(TOOL_NAME)_FILES = $(shell find Sources/$(TOOL_NAME) -name '*.swift') $(wildcard $(shell find $(MOD_LOC) -name '*.swift')) $(shell find $(THEOS)/include/cdaswift -name '*.mm')
3132
$(TOOL_NAME)_FILES += $(wildcard Sources/include/opainject/*.m)
@@ -38,28 +39,54 @@ $(TOOL_NAME)_INSTALL_PATH = /usr/local/bin
3839
endif
3940
$(TOOL_NAME)_PRIVATE_FRAMEWORKS = MobileCoreServices
4041

42+
## mldecryptapp
43+
APPLICATION_NAME = mldecryptapp
44+
$(APPLICATION_NAME)_FILES = $(shell find Sources/$(APPLICATION_NAME) -name '*.swift')
45+
$(APPLICATION_NAME)_FILES += $(wildcard $(shell find $(MOD_LOC) -name '*.swift'))
46+
# $(APPLICATION_NAME)_LIBRARIES = dobby
47+
$(APPLICATION_NAME)_FRAMEWORKS = UIKit CoreGraphics
48+
$(APPLICATION_NAME)_PRIVATE_FRAMEWORKS = MobileCoreServices
49+
$(APPLICATION_NAME)_CFLAGS = -fobjc-arc -w
50+
$(APPLICATION_NAME)_SWIFTFLAGS = -ISources/include
51+
52+
## mldecryptor tweak
4153
LIBRARY_NAME = mldecryptor
4254
$(LIBRARY_NAME)_FILES = Sources/load.s $(shell find Sources/$(LIBRARY_NAME) -name '*.swift') $(shell find $(THEOS)/include/kittymemswift -name '*.mm')
4355
$(LIBRARY_NAME)_CFLAGS = -fobjc-arc -w
56+
$(LIBRARY_NAME)_SWIFTFLAGS = -ISources/include
57+
$(LIBRARY_NAME)_PRIVATE_FRAMEWORKS = MobileCoreServices
4458
$(LIBRARY_NAME)_LIBRARIES = substrate
4559

4660
include $(THEOS)/makefiles/common.mk
61+
include $(THEOS_MAKE_PATH)/application.mk
4762
include $(THEOS_MAKE_PATH)/library.mk
4863

4964
ifeq ($(ROOTLESS),1)
5065
before-package::
66+
# for mldecryptapp
67+
cp info.plist $(THEOS_STAGING_DIR)/Applications/$(APPLICATION_NAME).app/
68+
ldid -Sent.plist $(THEOS_STAGING_DIR)/Applications/$(APPLICATION_NAME).app/$(APPLICATION_NAME)
69+
# for mldecrypt
5170
ldid -S./entitlements.plist $(THEOS_STAGING_DIR)/var/jb/usr/bin/$(TOOL_NAME);
5271

5372
# if ldid doesn't work...push entitlements.plist and do ldid on the device
5473
after-install::
74+
scp -P2222 ent.plist root@localhost:~/
75+
install.exec "ldid -Sent.plist /var/jb/Applications/mldecryptapp.app/mldecryptapp"
5576
scp -P2222 entitlements.plist root@localhost:~/
5677
install.exec "ldid -Sentitlements.plist /var/jb/usr/bin/mldecrypt"
5778
else
5879
before-package::
80+
# for mldecryptapp
81+
cp info.plist $(THEOS_STAGING_DIR)/Applications/$(APPLICATION_NAME).app/
82+
ldid -Sent.plist $(THEOS_STAGING_DIR)/Applications/$(APPLICATION_NAME).app/$(APPLICATION_NAME)
83+
# for mldecrypt
5984
ldid -S./entitlements.plist $(THEOS_STAGING_DIR)/usr/local/bin/$(TOOL_NAME);
6085

6186
# if ldid doesn't work...push entitlements.plist and do ldid on the device
6287
after-install::
88+
scp -P2222 ent.plist root@localhost:~/
89+
install.exec "ldid -Sent.plist /var/jb/Applications/mldecryptapp.app/mldecryptapp"
6390
scp -P2222 entitlements.plist root@localhost:~/
6491
install.exec "ldid -Sentitlements.plist /usr/local/bin/mldecrypt"
6592
endif

Package.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.6
1+
// swift-tools-version:5.7
22

33
import PackageDescription
44
import Foundation
@@ -25,7 +25,7 @@ struct Theos {
2525
path = ("~/theos" as NSString).expandingTildeInPath
2626
resources = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/swift"
2727
sdk = path + "/sdks/iPhoneOS16.2.sdk/"
28-
target = "12.2"
28+
target = "15.0"
2929

3030
return
3131
}
@@ -72,6 +72,13 @@ let package: Package = .init(
7272
],
7373
swiftSettings: [.unsafeFlags(swiftFlags)]
7474
),
75+
.target(
76+
name: "mldecryptapp",
77+
dependencies: [
78+
.product(name:"ZIPFoundation", package: "ZIPFoundation")
79+
],
80+
swiftSettings: [.unsafeFlags(swiftFlags)]
81+
),
7582
.target(
7683
name: "mldecryptor",
7784
dependencies: [],

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ make clean && make package
4242
- [swift-progress-bar](https://github.com/nsscreencast/469-swift-command-line-progress-bar)
4343
- [cda](https://github.com/ay-kay/cda)
4444
- [opainject](https://github.com/opa334/opainject)
45+
- [ProgressHUD](https://github.com/relatedcode/ProgressHUD)

Resources/AppIcon20x20.png

1.02 KB
Loading

Resources/AppIcon20x20@2x.png

3.21 KB
Loading

Resources/AppIcon20x20@3x.png

6.4 KB
Loading

Resources/AppIcon29x29.png

2.17 KB
Loading

Resources/AppIcon29x29@2x.png

7.14 KB
Loading

Resources/AppIcon29x29@3x.png

15.4 KB
Loading

0 commit comments

Comments
 (0)