Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions FWBundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ enum {
- (NSString *)downloadURL;
- (NSString *)oldOutputFile;
- (NSString *)outputFile;
- (BOOL)shouldUpdatePartitionSize;

//really lazy convenience classes
- (NSDictionary *)buildManifest;
Expand Down
4 changes: 2 additions & 2 deletions nitoUtility.m
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ - (void)patchFilesystem:(NSString *)inputFilesystem
{
NSLog(@"Decrypted Filesystem successfully!");
NSString *convertImage = [nitoUtility convertImage:decryptFS toFile:rwFS toMode:kDMGReadWrite]; //2
if (convertImage =! nil)
if (convertImage != nil)
{
NSLog(@"converted to read write successfully: %@", rwFS);

Expand Down Expand Up @@ -918,7 +918,7 @@ - (void)oldpatchFilesystem:(NSString *)inputFilesystem
{
NSLog(@"Decrypted Filesystem successfully!");
NSString *convertImage = [nitoUtility convertImage:decryptFS toFile:rwFS toMode:kDMGReadWrite]; //2
if (convertImage =! nil)
if (convertImage != nil)
{
NSLog(@"converted to read write successfully: %@", rwFS);
//need to take over with root access here for 3-8
Expand Down
4 changes: 2 additions & 2 deletions ripURL.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ - (void)downloadFile:(NSString *)theFile
- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error

{
NSLog(@"%@ %s", self, _cmd);
NSLog(@"%@ %s", self, __PRETTY_FUNCTION__);
[handler downloadFailed:downloadLocation];

}
Expand Down Expand Up @@ -149,7 +149,7 @@ - (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)le
} else {

// [downloadpBar setIndeterminate:YES];
NSLog(@"Bytes received - %d",bytesReceived);
NSLog(@"Bytes received - %0.2f",bytesReceived);

}

Expand Down
40 changes: 19 additions & 21 deletions tetherKitAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
static unsigned int quit = 0;
//static unsigned int verbose = 0;

static void print_progress_bar(double progress);

@implementation tetherKitAppDelegate

@synthesize window, downloadIndex, processing, enableScripting, firstView, secondView, poisoning, currentBundle, bundleController, counter, otherWindow, commandTextField, tetherLabel, countdownField;
Expand All @@ -64,6 +66,7 @@ of having to open source this because i know at very least libsyringe is GPL (an
/* probably not using this callback data variable properly, but i couldnt figure out how else to set download progress from the double values sent during uploading of iBSS and kernelcache */

void print_progress(double progress, void* data) {
tetherKitAppDelegate *self = (tetherKitAppDelegate *)data;
int i = 0;
if(progress < 0) {
return;
Expand All @@ -72,7 +75,7 @@ void print_progress(double progress, void* data) {
if(progress > 100) {
progress = 100;
}
[data setDownloadProgress:progress];
[self setDownloadProgress:progress];
printf("\r[");
for(i = 0; i < 50; i++) {
if(i < progress / 2) {
Expand Down Expand Up @@ -684,7 +687,7 @@ int progress_cb(irecv_client_t client, const irecv_event_t* event) {
return 0;
}

void print_progress_bar(double progress) {
static void print_progress_bar(double progress) {
int i = 0;
if(progress < 0) {
return;
Expand Down Expand Up @@ -727,7 +730,7 @@ - (int)inject
while(pois0n_is_ready()) {
sleep(1);
}
irecv_event_subscribe(client, IRECV_RECEIVED, &print_progress, NULL);
irecv_event_subscribe(client, IRECV_RECEIVED, (irecv_event_cb_t)&print_progress, self);
[self setDownloadText:NSLocalizedString(@"Found device in DFU mode", @"Found device in DFU mode")];
[self setInstructionText:@""];

Expand Down Expand Up @@ -922,7 +925,7 @@ int received_cb(irecv_client_t client, const irecv_event_t* event) {
if (event->type == IRECV_RECEIVED) {
int i = 0;
int size = event->size;
char* data = event->data;
const char* data = event->data;
for (i = 0; i < size; i++) {
printf("%c", data[i]);
}
Expand Down Expand Up @@ -1586,7 +1589,7 @@ - (NSArray *)runHelper:(NSString *)theKbag
while((outData = [swh readDataToEndOfFile]) && [outData length])
{
temp = [[[NSString alloc] initWithData:outData encoding:NSASCIIStringEncoding] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSLog(@"temp length: %lu", [temp length]);
NSLog(@"temp length: %lu", (unsigned long)[temp length]);

if ([temp length] > 800)
{
Expand Down Expand Up @@ -2708,31 +2711,28 @@ - (BOOL)pwnHelperCheckOwner

AuthorizationRef myAuthorizationRef;

OSStatus myStatus = AuthorizationCreate (NULL, kAuthorizationEmptyEnvironment, myFlags, &myAuthorizationRef);

OSStatus myStatus = AuthorizationCreate (NULL, kAuthorizationEmptyEnvironment, myFlags, &myAuthorizationRef);
if (myStatus != errAuthorizationSuccess) {
NSLog(@"Error creating authorization environment");
return NO;
}

// NSString *helpPath = [[NSBundle mainBundle] pathForResource: @"dHelper" ofType: @""];
// NSString *helpPath = [[NSBundle mainBundle] pathForResource: @"dHelper" ofType: @""];


//char *systemCopier = ( char * ) [helpPath fileSystemRepresentation];


AuthorizationItem rightSet[] = {{kAuthorizationRightExecute, 0, NULL, 0}};

AuthorizationRights rights = {1, rightSet};


myFlags = kAuthorizationFlagDefaults |// 8

kAuthorizationFlagInteractionAllowed |// 9

kAuthorizationFlagPreAuthorize |// 10

kAuthorizationFlagExtendRights;// 11
myFlags = (kAuthorizationFlagDefaults |// 8
kAuthorizationFlagInteractionAllowed |// 9
kAuthorizationFlagPreAuthorize |// 10
kAuthorizationFlagExtendRights);// 11

OSStatus result = AuthorizationCopyRights (myAuthorizationRef, &rights, NULL, myFlags, NULL );// 12



if(result == errAuthorizationSuccess)
{
char *command = "chown root:wheel \"$HELP\" && chmod 4755 \"$HELP\" && chmod +s \"$HELP\"";
Expand All @@ -2747,8 +2747,6 @@ - (BOOL)pwnHelperCheckOwner
/*Need to present the error dialog here telling the user to fix the permissions*/
return NO;
}
//
//return (NO);
}

return (YES);
Expand Down