OSX下Loader实现--By 飘云
////AppDelegate.m
//Loader For MacOSX
//Code By PiaoYun/P.Y.G
//
//Created by System Administrator on 10/24/14.
//Copyright (c) 2014 P.Y.G All rights reserved.
//https://www.chinapyg.com
//http://www.dllhook.com
#import "AppDelegate.h"
///////////////////////////////////////////////////////////////////////////////
// 动态库名称
#define DYLIB_NAME @"HookLib"
// 动态库类型
#define DYLIB_TYPE @"dylib"
// 待破解文件路径
#define FILE_PATH@"/private/var/root/Desktop/Reveal.app/Contents/MacOS/Reveal"
// BundleIdentifier
#define BUNDLE_IDENTIFIER @"com.ittybittyapps.Reveal"
///////////////////////////////////////////////////////////////////////////////
@implementation AppDelegate
-(void)bringToFrontApplicationWithBundleIdentifier:(NSString*)inBundleIdentifier
{
// 目标程序置前
NSArray* appsArray = ;
if( > 0)
{
[ activateWithOptions:NSApplicationActivateIgnoringOtherApps];
}
// 自杀
[ terminate:self];
}
-(void)launchApplicationWithPath:(NSString*)inPath andBundleIdentifier:(NSString*)inBundleIdentifier
{
if(inPath != nil)
{
NSString *dyldLibrary = [] pathForResource:DYLIB_NAME ofType:DYLIB_TYPE];
NSString *launcherString = ;
system();
// Bring it to front after a delay
;
}
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSString *calculatorPath = FILE_PATH;
if([ fileExistsAtPath:calculatorPath])
;
}
@end
曲高和寡,赞一个! “曲高和寡”,道一片凄凉啊,支持!
页:
[1]