-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
KritantaDev
authored and
KritantaDev
committed
Apr 28, 2021
0 parents
commit cd945fb
Showing
94 changed files
with
6,912 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# DragonBuild/src | ||
|
||
This folder contains tools we need to build from source. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: appinfo | ||
icmd: appinfo -e com.apple.mobilenotes | ||
id: me.krit.dragon.appinfo | ||
depends: mobilesubstrate | ||
version: 0.1.0 | ||
desc: Command line app info interface | ||
author: krit | ||
|
||
appinfo: | ||
type: cli | ||
entfile: ent.xml | ||
files: | ||
- appinfo.mm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// creative commons blah blah | ||
// @krit nov 2020 | ||
|
||
@import Foundation; | ||
#include <objc/runtime.h> | ||
#include <dlfcn.h> | ||
#include <CoreServices/CoreServices.h> | ||
#include <unistd.h> | ||
|
||
@interface LSApplicationProxy : NSObject | ||
@property (nonatomic, retain) NSString *itemName; | ||
@property (nonatomic, retain) NSString *applicationIdentifier; | ||
@property (nonatomic, retain) NSString *bundleExecutable; | ||
@property (nonatomic, retain) NSURL *dataContainerURL; | ||
@property (nonatomic, retain) NSString *canonicalExecutablePath; | ||
@end | ||
|
||
|
||
NSMutableArray *apps; | ||
|
||
NSString *idToExecutable(char *bundle); | ||
NSString *idToPath(char *bundle); | ||
NSString *idToContainer(char *bundle); | ||
|
||
void pout(NSString *out) | ||
{ | ||
printf([out UTF8String]); | ||
} | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
dlopen("/System/Library/Frameworks/CoreServices.framework/CoreServices", 0x4); | ||
Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); | ||
//Class LSApplicationProxy_class = objc_getClass("LSApplicationProxy"); | ||
SEL selector = NSSelectorFromString(@"defaultWorkspace"); | ||
NSObject* workspace = [LSApplicationWorkspace_class performSelector:selector]; | ||
SEL selectorALL = NSSelectorFromString(@"allInstalledApplications"); | ||
|
||
apps = [workspace performSelector:selectorALL]; | ||
|
||
|
||
|
||
if (strncmp(argv[1], "-e", 2) == 0) | ||
pout(idToExecutable(argv[2])); | ||
if (strncmp(argv[1], "-p", 2) == 0) | ||
pout(idToPath(argv[2])); | ||
if (strncmp(argv[1], "-c", 2) == 0) | ||
pout(idToContainer(argv[2])); | ||
|
||
} | ||
|
||
|
||
NSString *idToExecutable(char *bundle) | ||
{ | ||
for (LSApplicationProxy *app in apps) | ||
{ | ||
if ([app.applicationIdentifier isEqualToString:[NSString stringWithUTF8String:bundle]]) | ||
return app.bundleExecutable; | ||
} | ||
} | ||
|
||
NSString *idToPath(char *bundle) | ||
{ | ||
for (LSApplicationProxy *app in apps) | ||
{ | ||
if ([app.applicationIdentifier isEqualToString:[NSString stringWithUTF8String:bundle]]) | ||
return app.canonicalExecutablePath; | ||
} | ||
} | ||
|
||
NSString *idToContainer(char *bundle) | ||
{ | ||
for (LSApplicationProxy *app in apps) | ||
{ | ||
if ([app.applicationIdentifier isEqualToString:[NSString stringWithUTF8String:bundle]]) | ||
return app.dataContainerURL.absoluteString; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.private.mobileinstall.allowedSPI</key> | ||
<array> | ||
<string>Lookup</string> | ||
</array> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+12.7 KB
device/appinfo/packages/me.krit.dragon.appinfo_0.1.0_iphoneos-arm.deb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: decryptor | ||
icmd: true; | ||
id: me.krit.dragon.internal.autodecryptor | ||
depends: mobilesubstrate | ||
version: 0.1.0 | ||
desc: Dragon Internal Auto-Decryptor | ||
author: krit | ||
|
||
decryptor: | ||
type: tweak | ||
files: | ||
- decrypt.c | ||
stage: | ||
- "mkdir -p .dragon/_/usr/bin/" | ||
- "cp ../inject .dragon/_/usr/bin/inject" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Architecture: iphoneos-arm | ||
Author: krit | ||
Depends: mobilesubstrate | ||
Description: Dragon Internal Auto-Decryptor | ||
Maintainer: krit | ||
Name: decryptor | ||
Package: me.krit.dragon.internal.autodecryptor | ||
Section: Tweaks | ||
Version: 0.1.0 | ||
Installed-Size: 512 |
Binary file added
BIN
+194 KB
device/decryptor/build/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib
Binary file not shown.
13 changes: 13 additions & 0 deletions
13
device/decryptor/build/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?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>Filter</key> | ||
<dict> | ||
<key>Bundles</key> | ||
<array> | ||
<string>com.microsoft.skype.teams</string> | ||
</array> | ||
</dict> | ||
</dict> | ||
</plist> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# ninja log v5 | ||
0 77 1604368738697405720 .dragon/build/arm64/decrypt.c.o e4ad1f51c32fa947 | ||
1 77 1604368738699034297 .dragon/build/arm64e/decrypt.c.o 776a67245f834ec3 | ||
0 84 1604368738705960643 .dragon/build/armv7/decrypt.c.o 387fbe78d5945e11 | ||
77 230 1604368738850831371 .dragon/build/decryptor.arm64 dc60e05344c184b3 | ||
84 230 1604368738849811933 .dragon/build/decryptor.armv7 7ee818a8216fd89f | ||
78 230 1604368738850218747 .dragon/build/decryptor.arm64e 2661b7ca14c75097 | ||
230 250 1604368738875640243 .dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib.unsym 43992a2d52408bdd | ||
250 284 1604368738909493533 .dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib.unsigned 6d35bc716643ce75 | ||
284 298 1604368738923741468 .dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib 82bfe1a8bda26540 | ||
0 9 0 stage 32fbc80930479ff | ||
1 68 1604368761235683328 .dragon/build/arm64e/decrypt.c.o 776a67245f834ec3 | ||
1 69 1604368761235675113 .dragon/build/arm64/decrypt.c.o e4ad1f51c32fa947 | ||
1 73 1604368761240726886 .dragon/build/armv7/decrypt.c.o 387fbe78d5945e11 | ||
69 207 1604368761373347236 .dragon/build/decryptor.arm64 dc60e05344c184b3 | ||
68 207 1604368761373572912 .dragon/build/decryptor.arm64e 2661b7ca14c75097 | ||
73 210 1604368761376774558 .dragon/build/decryptor.armv7 7ee818a8216fd89f | ||
210 229 1604368761400095613 .dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib.unsym 43992a2d52408bdd | ||
229 255 1604368761426620817 .dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib.unsigned 6d35bc716643ce75 | ||
255 269 1604368761440351235 .dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib 82bfe1a8bda26540 | ||
0 8 0 stage 32fbc80930479ff | ||
0 68 1604369104227063942 .dragon/build/arm64/decrypt.c.o e4ad1f51c32fa947 | ||
0 68 1604369104227629380 .dragon/build/arm64e/decrypt.c.o 776a67245f834ec3 | ||
0 72 1604369104232190387 .dragon/build/armv7/decrypt.c.o 387fbe78d5945e11 | ||
68 227 1604369104383109495 .dragon/build/decryptor.arm64e 2661b7ca14c75097 | ||
72 227 1604369104382957409 .dragon/build/decryptor.armv7 7ee818a8216fd89f | ||
68 228 1604369104384367640 .dragon/build/decryptor.arm64 dc60e05344c184b3 | ||
228 244 1604369104407590685 .dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib.unsym 43992a2d52408bdd | ||
244 265 1604369104429144764 .dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib.unsigned 6d35bc716643ce75 | ||
265 278 1604369104442391762 .dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib 82bfe1a8bda26540 | ||
0 9 0 stage 32fbc80930479ff |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
me.krit.dragon.internal.autodecryptor_0.1.0_iphoneos-arm.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
name = decryptor | ||
lowername = decryptor | ||
|
||
# Build file for decryptor | ||
# Generated at 11/02/20 20:05:04 | ||
|
||
stagedir = _ | ||
location = /Library/MobileSubstrate/DynamicLibraries/ | ||
dragondir = $$DRAGONBUILD | ||
sysroot = -isysroot $dragondir/sdks/iPhoneOS.sdk | ||
proj_build_dir = .dragon | ||
objdir = $proj_build_dir/obj | ||
signdir = $proj_build_dir/sign | ||
builddir = $proj_build_dir/build | ||
build_target_file = $proj_build_dir/$stagedir/$location$name.dylib | ||
pwd = . | ||
resource_dir = Resources | ||
toolchain-prefix = arm64-apple-darwin14- | ||
|
||
stage = mkdir -p .dragon/_/usr/bin/; cp ../inject .dragon/_/usr/bin/inject | ||
stage2 = cp $name.plist $ | ||
$proj_build_dir/_/Library/MobileSubstrate/DynamicLibraries/$name.plist | ||
|
||
|
||
internalsigntarget = $signdir/$build_target_file.unsigned | ||
internalsymtarget = $signdir/$build_target_file.unsym | ||
|
||
fwSearch = -F$dragondir/sdks/iPhoneOS.sdk/System/Library/PrivateFrameworks/ $ | ||
-F$dragondir/frameworks | ||
libSearch = -L$dragondir/lib -L. | ||
modulesinternal = -fmodules -fcxx-modules -fmodule-name=$name $ | ||
-fbuild-session-file=$proj_build_dir/modules/ $ | ||
-fmodules-validate-once-per-build-session -fmodules-prune-after=345600 $ | ||
-fmodules-prune-interval=86400 | ||
|
||
cc = clang | ||
codesign = ldid | ||
cxx = clang++ | ||
dsym = dsymutil | ||
ld = clang++ | ||
lipo = lipo | ||
logos = $dragondir/modules/logos/bin/logos.pl | ||
optool = $dragondir/bin/optool | ||
plutil = plutil | ||
swift = swift | ||
|
||
targetvers = 10.0 | ||
targetprefix = -miphoneos-version-min= | ||
targetos = iphoneos | ||
triple = | ||
|
||
frameworks = -framework UIKit -framework Foundation | ||
libs = | ||
|
||
macros = | ||
arc = -fobjc-arc | ||
btarg = | ||
debug = -fcolor-diagnostics | ||
entfile = | ||
entflag = -S | ||
optim = 0 | ||
warnings = -Wall | ||
|
||
cinclude = -I$dragondir/include -I$dragondir/vendor/include $ | ||
-I$dragondir/include/_fallback -I$DRAGONBUILD/headers/ -I$pwd | ||
header_includes = | ||
public_headers = | ||
|
||
usrCflags = | ||
usrLDflags = | ||
|
||
libflags = | ||
lopts = -dynamiclib -ggdb -Xlinker -segalign -Xlinker 4000 | ||
typeldflags = | ||
|
||
cflags = | ||
ldflags = | ||
lflags = | ||
lfflags = | ||
swiftflags = | ||
|
||
theosshim = | ||
internalcflags = $cinclude $debug $fwSearch $cflags $btarg -O$optim $ | ||
$targetprefix$targetvers $sysroot $header_includes $arc $triple $ | ||
$theosshim $macros $warnings $modulesinternal | ||
internalldflags = -framework CydiaSubstrate | ||
internallflags = $internalcflags $typeldflags $frameworks $libs $libflags $ | ||
$lopts $libSearch $ldflags $libs | ||
internallfflags = | ||
internalswiftflags = -color-diagnostics -enable-objc-interop $ | ||
-sdk/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk $ | ||
-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos $ | ||
-g -L/usr/lib/swift -swift-version 5 -module-name $name | ||
|
||
rule linkarmv7 | ||
command = $ld -arch armv7 $internallflags $internalldflags -o $out $in | ||
description = Linking $in with $ld [armv7] | ||
rule linkarm64 | ||
command = $ld -arch arm64 $internallflags $internalldflags -o $out $in | ||
description = Linking $in with $ld [arm64] | ||
rule linkarm64e | ||
command = $ld -arch arm64e $internallflags $internalldflags -o $out $in | ||
description = Linking $in with $ld [arm64e] | ||
rule carm64 | ||
command = $cc -arch arm64 $internalcflags -c $in -o $out | ||
description = Compiling $in with $cc [arm64] | ||
rule stage | ||
command = $stage && $stage2 | ||
description = Running Stage for $name | ||
rule lipo | ||
command = $lipo -create $in -output $out | ||
description = Merging architechtures | ||
rule carm64e | ||
command = $cc -arch arm64e $internalcflags -c $in -o $out | ||
description = Compiling $in with $cc [arm64e] | ||
rule sign | ||
command = $codesign $entflag$entfile $in && cp $in $out | ||
description = Signing $name | ||
rule carmv7 | ||
command = $cc -arch armv7 $internalcflags -c $in -o $out | ||
description = Compiling $in with $cc [armv7] | ||
rule debug | ||
command = $dsym \"$in\" 2&> /dev/null; cp $in $out | ||
description = Generating Debug Symbols for $name | ||
|
||
build $builddir/armv7/decrypt.c.o: carmv7 decrypt.c | ||
build $builddir/$name.armv7: linkarmv7 $builddir/armv7/decrypt.c.o | ||
build $builddir/arm64/decrypt.c.o: carm64 decrypt.c | ||
build $builddir/$name.arm64: linkarm64 $builddir/arm64/decrypt.c.o | ||
build $builddir/arm64e/decrypt.c.o: carm64e decrypt.c | ||
build $builddir/$name.arm64e: linkarm64e $builddir/arm64e/decrypt.c.o | ||
build $internalsymtarget: lipo $builddir/$name.armv7 $builddir/$name.arm64 $ | ||
$builddir/$name.arm64e | ||
build $internalsigntarget: debug $internalsymtarget | ||
build $build_target_file: sign $internalsigntarget | ||
build stage: stage build.ninja | ||
|
||
default $build_target_file |
Binary file added
BIN
+194 KB
.../.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib.unsigned
Binary file not shown.
Binary file added
BIN
+193 KB
...ild/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/decryptor.dylib.unsym
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: decryptor | ||
icmd: true; | ||
id: me.krit.dragon.internal.autodecryptor | ||
depends: mobilesubstrate | ||
version: 0.1.0 | ||
desc: Dragon Internal Auto-Decryptor | ||
author: krit | ||
|
||
decryptor: | ||
type: tweak | ||
files: | ||
- decrypt.c | ||
stage: | ||
- "mkdir -p .dragon/_/usr/bin/" | ||
- "cp ../inject .dragon/_/usr/bin/inject" |
Oops, something went wrong.