Advertisement
bottomy

Untitled

Apr 23rd, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import <Foundation/Foundation.h>
  2.  
  3. extern CFTypeRef _CFKeyedArchiverUIDCreate(CFAllocatorRef, uint32_t);
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7.     @autoreleasepool {
  8.         CFPropertyListRef Nib = CFPropertyListCreateWithData(kCFAllocatorDefault, (CFDataRef)[NSData dataWithContentsOfFile: @"/ADD_YOUR_PATH_HERE/OSXPatchMe V2.app/Contents/Resources/en.lproj/MainMenu.nib"], kCFPropertyListMutableContainersAndLeaves, NULL, NULL);
  9.        
  10.         NSMutableArray *Objects = [(NSMutableDictionary*)Nib objectForKey: @"$objects"];
  11.        
  12.         NSUInteger Index = [Objects count];
  13.         [Objects addObject: @"pushed:"];
  14.        
  15.        
  16.         CFTypeRef LabelKAUID = _CFKeyedArchiverUIDCreate(kCFAllocatorDefault, Index);
  17.         [[Objects objectAtIndex: 94] setObject: LabelKAUID forKey: @"NSLabel"];
  18.         CFRelease(LabelKAUID);
  19.        
  20.        
  21.         [[(NSData*)CFPropertyListCreateData(kCFAllocatorDefault, Nib, kCFPropertyListBinaryFormat_v1_0, 0, NULL) autorelease] writeToFile:  @"/ADD_YOUR_PATH_HERE/OSXPatchMe V2.app/Contents/Resources/en.lproj/MainMenu.nib" atomically: NO];
  22.        
  23.        
  24.         CFRelease(Nib);
  25.     }
  26.    
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement