Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Fix ThirdPartyLoader. Removed dumpdecrypted as it's crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
Naville committed Aug 21, 2016
1 parent 8cb6428 commit b7e7846
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 283 deletions.
16 changes: 5 additions & 11 deletions ThirdPartyTemplate.xm
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ extern NSString* RandomString();
typedef void (*WTLoaderPrototype)();
extern void init_TEMPLATENAME_hook(){
#ifndef NonJailbroken
#ifdef PROTOTYPE
//Because We Ain't Ready Yet. No Test
for(int i=0;i<_dyld_image_count();i++){
const char * Nam=_dyld_get_image_name(i);
NSString* curName=[[NSString stringWithUTF8String:Nam] autorelease];
NSString* curName=[NSString stringWithUTF8String:Nam];
if([curName containsString:WTFJHTWEAKNAME]){
#ifdef DEBUG
NSLog(@"Found WTFJH At %i th Image",i);
Expand All @@ -29,12 +28,9 @@ extern void init_TEMPLATENAME_hook(){
#endif
data=ASLROffset+data;//Add ASLR Offset To Pointer And Fix Address
NSData* SDData=[NSData dataWithBytes:data length:size];
NSString* randomPath=[NSString stringWithFormat:@"%@/Documents/%@",NSHomeDirectory(),RandomString()];
NSString* randomPath=[NSString stringWithFormat:@"%@/tmp/%@",NSHomeDirectory(),RandomString()];
[SDData writeToFile:randomPath atomically:YES];
void* handle=dlopen(randomPath.UTF8String,RTLD_NOW);//Open Created dylib
dlclose(handle);

handle = dlopen(0, RTLD_GLOBAL | RTLD_NOW);
WTLoaderPrototype WTHandle =(WTLoaderPrototype) dlsym(handle, "WTFJHInitTEMPLATENAME"); //Call Init Function
if(WTHandle!=NULL){
WTHandle();
Expand All @@ -49,20 +45,18 @@ extern void init_TEMPLATENAME_hook(){
WTSave;
WTRelease;
//End
[randomPath release];
[SDData release];
break;
}


return;
}

}
#endif
#elif

NSString* BundledDYLIBPath=[NSString stringWithFormat:@"%@/TEMPLATENAME.dylib",[NSBundle mainBundle].bundlePath];
dlopen(BundledDYLIBPath.UTF8String,RTLD_NOW);

[BundledDYLIBPath release];
#endif

}
6 changes: 0 additions & 6 deletions ThirdPartyTools/dumpdecrypted/Makefile

This file was deleted.

4 changes: 0 additions & 4 deletions ThirdPartyTools/dumpdecrypted/README.md

This file was deleted.

260 changes: 0 additions & 260 deletions ThirdPartyTools/dumpdecrypted/dumpdecrypted.m

This file was deleted.

1 change: 0 additions & 1 deletion ThirdPartyTools/dumpdecrypted/obj

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
437
440

0 comments on commit b7e7846

Please sign in to comment.