Skip to content

Commit

Permalink
1.1, MUCH cleaner code and folder choose is back. This one should be …
Browse files Browse the repository at this point in the history
…really stable
  • Loading branch information
haxi0 committed Dec 29, 2022
1 parent 61b117f commit 0da9116
Show file tree
Hide file tree
Showing 7 changed files with 320 additions and 1,054 deletions.
Binary file removed TrollLock/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions TrollLock/TrollLock.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = org.haxi0.TrollLock;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -514,7 +514,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = org.haxi0.TrollLock;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down

This file was deleted.

22 changes: 11 additions & 11 deletions TrollLock/TrollLock/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="Kxy-uv-v2d">
<rect key="frame" x="216" y="481" width="49" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</switch>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JkM-bP-efo">
<rect key="frame" x="320" y="51" width="39" height="39"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
Expand All @@ -53,13 +49,6 @@
<action selector="info:" destination="BYZ-38-t0r" eventType="touchUpInside" id="z0Q-Od-GLg"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.29999999999999999" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Custom Lock" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hYC-5w-1Rd">
<rect key="frame" x="16" y="486" width="192" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" animating="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="U3S-dY-qMN">
<rect key="frame" x="16" y="695" width="341" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
Expand All @@ -71,6 +60,17 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.29999999999999999" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Custom Lock" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hYC-5w-1Rd">
<rect key="frame" x="16" y="484" width="192" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="Kxy-uv-v2d">
<rect key="frame" x="216" y="479" width="49" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</switch>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
Expand Down
89 changes: 66 additions & 23 deletions TrollLock/TrollLock/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,72 @@ - (IBAction)go:(id)sender {
[alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
textField.placeholder = @"URL to .zip";
}];
UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
UIAlertAction *firstAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
struct utsname systemInfo;
uname(&systemInfo);
NSString* code = [NSString stringWithCString:systemInfo.machine
encoding:NSUTF8StringEncoding];
overwriteLock(code, true, [[alertController textFields][0] text]);
overwriteLock(true, [[alertController textFields][0] text], @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
[alertController addAction:confirmAction];
UIAlertAction *secondAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(true, [[alertController textFields][0] text], @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
UIAlertAction *thirdAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(true, [[alertController textFields][0] text], @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
UIAlertAction *fourthAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(true, [[alertController textFields][0] text], @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
UIAlertAction *fifthAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(true, [[alertController textFields][0] text], @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
[alertController addAction:firstAction];
[alertController addAction:secondAction];
[alertController addAction:thirdAction];
[alertController addAction:fourthAction];
[alertController addAction:fifthAction];
[self presentViewController:alertController animated:YES completion:nil];
} else {
self->_Active.hidden = false;
self->_Warning.hidden = false;
struct utsname systemInfo;
uname(&systemInfo);
NSString* code = [NSString stringWithCString:systemInfo.machine
encoding:NSUTF8StringEncoding];
overwriteLock(code, false, @"");
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Select a folder"
message:@"Each one is different for all devices. Try all of them and if you don't succeed, join my Discord server for support."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *firstAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(false, @"", @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
UIAlertAction *secondAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(false, @"", @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
UIAlertAction *thirdAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(false, @"", @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
UIAlertAction *fourthAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(false, @"", @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
UIAlertAction *fifthAction = [UIAlertAction actionWithTitle:@"[email protected]" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_Active.hidden = false;
self->_Warning.hidden = false;
overwriteLock(false, @"", @"/System/Library/PrivateFrameworks/SpringBoardUIServices.framework/[email protected]/main.caml");
}];
[alertController addAction:firstAction];
[alertController addAction:secondAction];
[alertController addAction:thirdAction];
[alertController addAction:fourthAction];
[alertController addAction:fifthAction];
[self presentViewController:alertController animated:YES completion:nil];
}
}];
UIAlertAction *secondAction = [UIAlertAction actionWithTitle:@"Respring"
Expand All @@ -70,9 +117,7 @@ - (IBAction)go:(id)sender {
}
}];
UIAlertAction *thirdAction = [UIAlertAction actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {
}];

style:UIAlertActionStyleCancel handler:nil];
[alert addAction:firstAction];
[alert addAction:thirdAction];

Expand All @@ -96,19 +141,18 @@ - (IBAction)info:(id)sender {
message:@"Made with ♡ by Nathan & haxi0. Thanks to: zhuowei, MR X, k.y., Finny, bonnie, rxfe_, PrimePlatypus, Nightinq and apricot."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *firstAction = [UIAlertAction actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {
}];
style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *secondAction = [UIAlertAction actionWithTitle:@"Visit the Discord Server"
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[application openURL:URL options:@{} completionHandler:^(BOOL success) {}];
[application openURL:URL options:@{} completionHandler:nil];
}];
UIAlertAction *thirdAction = [UIAlertAction actionWithTitle:@"ZipArchive Project"
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[application openURL:URL2 options:@{} completionHandler:^(BOOL success) {}];
[application openURL:URL2 options:@{} completionHandler:nil];
}];
UIAlertAction *fourthAction = [UIAlertAction actionWithTitle:@"MacDirtyCow Exploit"
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[application openURL:URL3 options:@{} completionHandler:^(BOOL success) {}];
[application openURL:URL3 options:@{} completionHandler:nil];
}];

[alert addAction:firstAction];
Expand All @@ -121,5 +165,4 @@ - (IBAction)info:(id)sender {




@end
2 changes: 1 addition & 1 deletion TrollLock/TrollLock/poc.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
#define poc_h

#include <stdio.h>
void overwriteLock(NSString *model, BOOL *media, NSString *url);
void overwriteLock(BOOL *media, NSString *url, NSString *path);
#endif /* poc_h */
Loading

0 comments on commit 0da9116

Please sign in to comment.