-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDRM Code.txt
68 lines (51 loc) · 2.29 KB
/
DRM Code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
OBJC_EXTERN CFStringRef MGCopyAnswer(CFStringRef key) WEAK_IMPORT_ATTRIBUTE;
%hook SpringBoard
%new
-(void)safeMode {
system("killall -SEGV SpringBoard");
}
-(void)applicationDidFinishLaunching:(BOOL)beh {
%orig;
CFStringRef UDNumber = MGCopyAnswer(CFSTR("UniqueDeviceID"));
//NSString* UDID = (NSString*)UDNumber;
NSString* UDID = @"kek";
NSString *url =[NSString stringWithFormat:@"http://gmoran.me/api/check.php?UDID=%@", UDID];
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
[req setHTTPMethod:@"GET"];
NSHTTPURLResponse* urlResponse = nil;
NSData *responseData = [NSURLConnection sendSynchronousRequest:req returningResponse:&urlResponse error:nil];
NSString *result = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
CFRelease(UDNumber);
if ([result isEqualToString:@"Not Licensed"]) {
if (IS_BETA_BUILD) {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Eclipse 2 Beta"
message:@"Beta access is restricted to paying customers."
delegate:nil
cancelButtonTitle:nil
otherButtonTitles:nil];
[alert show];
[alert release];
[NSTimer scheduledTimerWithTimeInterval:5.0
target:self
selector:@selector(safeMode)
userInfo:nil
repeats:NO];
}
else {
/*
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Eclipse"
message:@"It appears that you are running an unlicensed version of Eclipse. If you enjoy Eclipse, please consider purchasing it on the Cydia Store for $0.99 :) \n\n\n Love, @fr0st"
delegate:nil
cancelButtonTitle:@"Okay"
otherButtonTitles:nil];
[alert show];
[alert release];
[result release];
*/
//Enough.
}
}
}
%end