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

Commit

Permalink
Can Skip 3RDTools+More OCR
Browse files Browse the repository at this point in the history
  • Loading branch information
Naville committed Mar 18, 2016
1 parent 992c938 commit c64162d
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 211 deletions.
4 changes: 0 additions & 4 deletions Hooks/API/MachO.xm
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ extern unsigned long get_edata(void);
* Runtime interfaces for 32-bit Mach-O programs.
extern uint8_t *getsegmentdata(
const struct mach_header *mhp,
const char *segname,
unsigned long *size);
Runtime interfaces for 64-bit Mach-O programs.
extern const struct section_64 *getsectbyname(
Expand Down
39 changes: 37 additions & 2 deletions Hooks/API/ObjCRuntime.xm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ BOOL (*old_class_addIvar)(Class cls, const char *name, size_t size,uint8_t align
Class (*old_objc_getClass)(const char *name);
IMP (*old_class_getMethodImplementation)(Class cls, SEL name);
IMP (*old_class_replaceMethod)(Class cls, SEL name, IMP imp, const char *types);

const char **(*old_objc_copyImageNames)(unsigned int *outCount);
const char *(*old_class_getImageName)(Class cls);
//New Func
Class new_NSClassFromString(NSString* aClassName){
if(WTShouldLog){
Expand Down Expand Up @@ -228,6 +229,40 @@ IMP new_class_replaceMethod(Class cls, SEL name, IMP imp, const char *types){


}

const char ** new_objc_copyImageNames(unsigned int *outCount){
const char** NameList=old_objc_copyImageNames(outCount);
if(WTShouldLog){
WTInit(@"ObjCRuntime",@"objc_copyImageNames");
int Counter=*outCount;
for(int x=0;x<Counter;x++){
NSString* string=[NSString stringWithUTF8String:NameList[x]];
NSString* keyName=[NSString stringWithFormat:@"ImageNameAtIndex:%i",x];
WTAdd(string,keyName);
[string release];
[keyName release];
}
WTSave;
WTRelease;

}

return NameList;

}

const char * new_class_getImageName(Class cls){
const char* Name=old_class_getImageName(cls);
if(WTShouldLog){
WTInit(@"ObjCRuntime",@"class_getImageName");
WTAdd(NSStringFromClass(cls),@"ClassName");
WTAdd([NSString stringWithUTF8String:Name],@"ImageName");
WTSave;
WTRelease;
}
return Name;
}

extern void init_ObjCRuntime_hook() {
MSHookFunction((void*)NSClassFromString,(void*)new_NSClassFromString, (void**)&old_NSClassFromString);
MSHookFunction((void*)NSStringFromClass,(void*)new_NSStringFromClass, (void**)&old_NSStringFromClass);
Expand All @@ -240,5 +275,5 @@ extern void init_ObjCRuntime_hook() {
MSHookFunction((void*)objc_getClass,(void*)new_objc_getClass, (void**)&old_objc_getClass);
MSHookFunction((void*)class_getMethodImplementation,(void*)new_class_getMethodImplementation, (void**)&old_class_getMethodImplementation);
MSHookFunction((void*)class_replaceMethod,(void*)new_class_replaceMethod, (void**)&old_class_replaceMethod);

MSHookFunction((void*)objc_copyImageNames,(void*)new_objc_copyImageNames, (void**)&old_objc_copyImageNames);
}
47 changes: 0 additions & 47 deletions Hooks/ThirdPartyTools/DeviceIDFake.xm

This file was deleted.

47 changes: 0 additions & 47 deletions Hooks/ThirdPartyTools/InspectiveC.xm

This file was deleted.

1 change: 1 addition & 0 deletions Hooks/ThirdPartyTools/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ThirdPartyLoaders
>This is the place where you put your third party loaders.
>Build Script Will Generate One If you don't want(or need) to write one your self
47 changes: 0 additions & 47 deletions Hooks/ThirdPartyTools/classdumpdyld.xm

This file was deleted.

47 changes: 0 additions & 47 deletions Hooks/ThirdPartyTools/dumpdecrypted.xm

This file was deleted.

13 changes: 0 additions & 13 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion ThirdPartyTools/InspectiveC/obj
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
349
351
12 changes: 10 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ def buildlistdir(path):#So We Can Intercept And Remove Unwanted Modules
for y in fileList:
if (y == x+".xm"):#Only Remove Module Files
fileList.remove(y)
print (Fore.RED+y+" Removed")
print (Fore.RED+y+" Removed From Modules")
return fileList
def Thirdbuildlistdir(path):#So We Can Intercept And Remove Unwanted Modules
fileList=listdir(path)
for x in SkippedList:
for y in fileList:
if (x == y):#Only Remove Module Files
fileList.remove(y)
print (Fore.RED+y+" Removed From Third Party Modules")
return fileList
#Clean-Up
def cleanUp():
Expand Down Expand Up @@ -302,7 +310,7 @@ def BuildLoader(ModuleName):
f.close()
def buildThirdPartyComponents():
Exec("find . -type f -name .DS_Store -delete && xattr -cr *")
for x in buildlistdir("ThirdPartyTools"):
for x in Thirdbuildlistdir("ThirdPartyTools"):
os.chdir(InitialCWD)#Make Sure CWD We've changed in buildThirdPartyComponents() is set back
if os.path.isdir("ThirdPartyTools/"+x)==False:
print (Fore.YELLOW+"ThirdPartyTools/"+x+" Not A Folder. Skipped")
Expand Down

0 comments on commit c64162d

Please sign in to comment.