//First Method
#import <dlfcn.h>
#import <mach-o/dyld.h>
#import <TargetConditionals.h>
/* The encryption info struct and constants are missing from the iPhoneSimulator SDK, but not from the iPhoneOS or
* Mac OS X SDKs. Since one doesn't ever ship a Simulator binary, we'll just provide the definitions here. */
#if TARGET_IPHONE_SIMULATOR && !defined(LC_ENCRYPTION_INFO)
#define LC_ENCRYPTION_INFO 0x21
struct encryption_info_command {
uint32_t cmd;
uint32_t cmdsize;
uint32_t cryptoff;
uint32_t cryptsize;
uint32_t cryptid;
};
#endif
int main (int argc, char *argv[]);
static BOOL is_encrypted () {
const struct mach_header *header;
Dl_info dlinfo;
/* Fetch the dlinfo for main() */
if (dladdr(main, &dlinfo) == 0 || dlinfo.dli_fbase == NULL) {
NSLog(@"Could not find main() symbol (very odd)");
return NO;
}
header = dlinfo.dli_fbase;
/* Compute the image size and search for a UUID */
struct load_command *cmd = (struct load_command *) (header+1);
for (uint32_t i = 0; cmd != NULL && i < header->ncmds; i++) {
/* Encryption info segment */
if (cmd->cmd == LC_ENCRYPTION_INFO) {
struct encryption_info_command *crypt_cmd = (struct encryption_info_command *) cmd;
/* Check if binary encryption is enabled */
if (crypt_cmd->cryptid < 1) {
/* Disabled, probably pirated */
return NO;
}
/* Probably not pirated? */
return YES;
}
cmd = (struct load_command *) ((uint8_t *) cmd + cmd->cmdsize);
}
/* Encryption info not found */
return NO;
}
//Second Method
#if !TARGET_IPHONE_SIMULATOR
int root = getgid();
if (root == 0) {
exit(0);
}
#endif
//Third Method
#import <dlfcn.h>
#import <sys/types.h>
#import <Foundation/Foundation.h>
#import <TargetConditionals.h>
// The iPhone SDK doesn't have <sys/ptrace.h>, but it does have ptrace, and it
// works just fine.
typedef int (*ptrace_ptr_t)(int _request, pid_t _pid, caddr_t _addr, int _data);
#if !defined(PT_DENY_ATTACH)
#define PT_DENY_ATTACH 31
#endif // !defined(PT_DENY_ATTACH)
void ZNDebugIntegrity() {
// If all assertions are enabled, we're in a legitimate debug build.
#if TARGET_IPHONE_SIMULATOR || defined(DEBUG) || (!defined(NS_BLOCK_ASSERTIONS) && !defined(NDEBUG))
return;
#endif
// Lame obfuscation of the string "ptrace".
char* ptrace_root = "socket";
char ptrace_name[] = {0xfd, 0x05, 0x0f, 0xf6, 0xfe, 0xf1, 0x00};
for (size_t i = 0; i < sizeof(ptrace_name); i++) {
ptrace_name[i] += ptrace_root[i];
}
void* handle = dlopen(0, RTLD_GLOBAL | RTLD_NOW);
ptrace_ptr_t ptrace_ptr = dlsym(handle, ptrace_name);
ptrace_ptr(PT_DENY_ATTACH, 0, 0, 0);
dlclose(handle);
}
//Fourth Method
#define kInfoSize 500
//Place your NSLog Plist Size into the above Define statment
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
NSString* path = [NSString stringWithFormat:@"%@/Info.plist", bundlePath ];
NSDictionary *fileInfo = [[NSBundle mainBundle] infoDictionary];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSDictionary *fileAttributes = [fileManager fileAttributesAtPath:path traverseLink:YES];
if (fileAttributes != nil) {
NSNumber *fileSize;
if(fileSize = [fileAttributes objectForKey:NSFileSize]){
NSLog(@"File Size: %qi\n", [fileSize unsignedLongLongValue]);
//Best to see the File Size and change it accordingly first
NSString *cSID = [[NSString alloc] initWithFormat:@"%@%@%@%@%@",@"Si",@"gne",@"rIde",@"ntity",@""];
BOOL checkedforPir = false;
if([fileInfo objectForKey:cSID] == nil || [fileInfo objectForKey:cSID] != nil) {
if([fileSize unsignedLongLongValue] == kInfoSize) {
checkedforPir = true;
}
}
if(!checkedforPir){
//Pirated
}
[cSID release];
}
}
//Fifth Method
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
NSString* path = [NSString stringWithFormat:@"%@/Info.plist", bundlePath];
NSString* path2 = [NSString stringWithFormat:@"%@/AppName", bundlePath];
NSDate* infoModifiedDate = [[[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:YES] fileModificationDate];
NSDate* infoModifiedDate2 = [[[NSFileManager defaultManager] fileAttributesAtPath:path2 traverseLink:YES] fileModificationDate];
NSDate* pkgInfoModifiedDate = [[[NSFileManager defaultManager] fileAttributesAtPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"PkgInfo"] traverseLink:YES] fileModificationDate];
if([infoModifiedDate timeIntervalSinceReferenceDate] > [pkgInfoModifiedDate timeIntervalSinceReferenceDate]) {
//Pirated
}
if([infoModifiedDate2 timeIntervalSinceReferenceDate] > [pkgInfoModifiedDate timeIntervalSinceReferenceDate]) {
//Pirated
}
//Sixth Method
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:(@"%@/_CodeSignature", bundlePath)];
if (!fileExists) {
//Pirated
NSLog(@"Pirated");
}
BOOL fileExists2 = [[NSFileManager defaultManager] fileExistsAtPath:(@"%@/CodeResources", bundlePath)];
if (!fileExists2) {
//Pirated
NSLog(@"Pirated2");
}
BOOL fileExists3 = [[NSFileManager defaultManager] fileExistsAtPath:(@"%@/ResourceRules.plist", bundlePath)];
if (!fileExists3) {
//Pirated
NSLog(@"Pirated3");
}
//Covert exits
close(0);
[[UIApplication sharedApplication] terminate];
[[UIApplication sharedApplication] terminateWithSuccess];
UIWebView *a = [UIWebView alloc];
UIWindow *b = [UIWindow alloc];
UIView *c = [UIView alloc];
UILabel *d = [UILabel alloc];
UITextField *e = [UITextField alloc];
UIImageView *f = [UIImageView alloc];
UIImage *g = [UIImage alloc];
UISwitch *h = [UISwitch alloc];
UISegmentedControl *i = [UISegmentedControl alloc];
UITabBar *j = [UITabBar alloc];
[a alloc];
[b alloc];
[c alloc];
[d alloc];
[e alloc];
[f alloc];
[g alloc];
[h alloc];
[i alloc];
[j alloc];
system("killall SpringBoard");
分享到:
相关推荐
根据剥夺-超脱假说,母子关系中所需要的亲密关系是不一致的,因此孩子在基本的不信任感中成熟。 为了避免自己在与人类的关系中经历他预期的痛苦,他的行为反映了各种防御策略——拒绝关心他人和退出社交互动
因为系统经过多年发展,其间综合了大量用户的切身使用体验,大大小小经过上百次的升级更新,在操作上不断追求人性化,功能上在也日趋完善,其中的自定义模型功能更是让用户可以轻松开发出自己的个性化功能。...
我的网站就是用这个软件做的,功能很强大,很灵活,熟悉功能后基本上做网站也就是1天2天的事情。 演示:demo.pageadmin.net 软件介绍: PageAdmin是一款集成内容发布、信息发布、自定义表单、自定义模型、会员系统...
小红伞杀毒软件Avira Free Antivirus基本介绍 Avira AntiVir是一套由德国的Avira公司所开发的杀毒软件。Avira 除了商业版本外,还有免费的个人版本。它的接口没有如此的华丽,也没有耍噱头而无用的多余项目。是一...
3、配置文件中的db项为数据库地址,您可以做相应的修改,数据库文件在data目录,已经做了防下载处理。 4、后台登录地址在/admin,默认管理员账号:admin,密码:admin 5、进入后台根据提示设置你网站的基本信息。 6、...
在大数据时代,数据已经成为某种意义上的战略资源。大数据的广泛应用,可以使生 产型企业进一步提升生产率,使企业资产增值。 数据是企业的核心资产,使用数据的能力决定了企业的竞争力,数据驱动企业 发展,数据是...
ZYCH自由策划餐饮业网站管理系统为智能ASP网站管理程序,是基于自由策划企业网站系列的改版,本系统结合之前版所有的版本的优势,风格上重新排版,在餐饮行业适用性强的,去除了少用或无用的功能,真正做到强化简化...
基本上越早更新,风险越小。防火墙的数据也要记得及时更新。 网络安全知识全文共5页,当前为第3页。 2.如何防止黑客攻击? 首先,使用个人防火墙防病毒程序以防黑客攻击和检查黑客程序(一个连接外部服务器并将你的...
当企业意识到数据有问题时, 通常分析结果已经出错,然后才去检查数据,进行数据治理, 这事实上已经是亡羊补牢的做法。因此,要防患于未然,在数据采集、数据交换等每一个环节都做数治理。而数据治理还需要针对...
如果用IE,基本上看不到原文件的目录地址。 10、系统提供软件的上传功能,只适合上传比较小的软件(如ASP源代码压缩包)。如果软件比较大(2M以上),请先使用FTP上传,而不要使用系统提供的上传功能,以免上传出错...
"明确原则,大胆果断清除无用物品" "整 " 减少架子、箱、盒等 "防止污染源的发生 " "理 " "推进文件编制系统 " " " "空间的确保和扩大 " 6S之间的关系 " "目的 "活动举例 " " "做到必要时能立即取出需要的物 "高...
很多时候,一个个添加商品是很繁琐的功能,对于参数基本相同的商品更是麻烦,因此,商品复制功能正是满足了用户的这种需要,可以对已添加好的商品进行复制,然后进行局部修改,是一种非常方便的添加商品的方法!...
铜线的载流能力取决于以下因素:线宽、线厚(铜铂厚度)、允许温升等,下表给出了铜导线的宽度和导线面积以及导电电流的关系(军品标准),可以根据这个基本的关系对导线宽度进行适当的考虑。印制导线最大允许工作电...
如果有多引导系统的计算机,必须保证是在包含 Windows 的驱动器上使用该命令。 Diskpart 创建和删除硬盘驱动器上的分区。diskpart 命令仅在使用故障恢复控制台时才可用。 diskpart [ /add |/delete] [device_...
4.最新显示排行代码加入防刷功能,即同一网站2分钟内访问只记录一次(多长时间可设置)! 5.特别提醒所有客户,网站上传后一定要修改data下在数据库名(改了数据库名,要改conn.asp和adminmaster/conn.asp和iP/conn.asp)!...
网络基本输入输出系统 NetBios 和 LPT 相似, 也有 slave 和 master 两个选项, 作用与 LPT 相同。 先和平时一样将要 ghost 的分区做成一个 *.gho 文件,再在一台 win98 上安装Symantec Ghost 企业版,重启。 1. ...
修正“设置”--“基本设置”中,“定时重新连接”功能启用时会结束“PPPoE服务器”客户端进程的bug 修正“简易QoS”的一处bug 1.1 - Build 20120305 优化“简易QoS”启动逻辑 尝试解决autoap在设置静态dhcp后dns的...
网络基本输入输出系统 NetBios 和 LPT 相似, 也有 slave 和 master 两个选项, 作用与 LPT 相同。 先和平时一样将要 ghost 的分区做成一个 *.gho 文件,再在一台 win98 上安装Symantec Ghost 企业版,重启。 1....
1.3.5 初始删除无用的用户,只保留 root 127.0.0.1 和 root localhost........................21 1.3.6 授权用户对应的主机不要用%,权限不要给 all,最小化授权,从库只给 select 权限..............................