This repository has been archived by the owner on Jul 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
370 changed files
with
167,844 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// AntiGDB.h | ||
// SpeakEvents | ||
// | ||
// Created by K3A on 2/9/12. | ||
// Copyright (c) 2012 K3A. All rights reserved. | ||
// | ||
#pragma once | ||
|
||
#include <math.h> | ||
#include <sys/sysctl.h> | ||
#include <unistd.h> | ||
|
||
#include <err.h> | ||
#include <errno.h> | ||
#include <stdio.h> | ||
#include <signal.h> | ||
#include <sys/types.h> | ||
#import <dlfcn.h> | ||
#import <sys/types.h> | ||
|
||
static __attribute__((always_inline)) bool gdb_disable(){return true;}; | ||
static __attribute__((always_inline)) bool gdb_check(bool terminateIfYes=true){return false;}; |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Created by K3A on 5/20/12. | ||
// Copyright (c) 2012 K3A. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface K3AStringFormatter : NSObject { | ||
NSMutableArray* _args; | ||
} | ||
|
||
@property(nonatomic, copy) NSString* format; | ||
|
||
+(K3AStringFormatter*)formatterWithFormat:(NSString*)f; | ||
-(K3AStringFormatter*)initWithFormatString:(NSString*)f; | ||
|
||
-(K3AStringFormatter*)addString:(NSString*)arg; | ||
-(K3AStringFormatter*)addFloat:(float)arg; | ||
-(K3AStringFormatter*)addInt:(int)arg; | ||
|
||
-(NSString*)generateString; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// | ||
// Created by K3A on 5/20/12. | ||
// Copyright (c) 2012 K3A. All rights reserved. | ||
// | ||
|
||
#import "K3AStringFormatter.h" | ||
|
||
@implementation K3AStringFormatter | ||
@synthesize format; | ||
|
||
+(K3AStringFormatter*)formatterWithFormat:(NSString*)f | ||
{ | ||
return [[K3AStringFormatter alloc] initWithFormatString:f]; | ||
} | ||
|
||
-(K3AStringFormatter*)initWithFormatString:(NSString*)f | ||
{ | ||
if ( (self = [super init]) ) | ||
{ | ||
_args = [NSMutableArray new]; | ||
self.format = f; | ||
} | ||
return self; | ||
} | ||
|
||
-(void)dealloc | ||
{ | ||
[_args release]; | ||
[format release]; | ||
[super dealloc]; | ||
} | ||
|
||
-(K3AStringFormatter*)addString:(NSString*)arg | ||
{ | ||
[_args addObject:arg]; | ||
return self; | ||
} | ||
-(K3AStringFormatter*)addFloat:(float)arg | ||
{ | ||
[_args addObject:[NSString stringWithFormat:@"%.2f", arg]]; | ||
return self; | ||
} | ||
-(K3AStringFormatter*)addInt:(int)arg | ||
{ | ||
[_args addObject:[NSString stringWithFormat:@"%d", arg]]; | ||
return self; | ||
} | ||
|
||
-(NSString*)generateString | ||
{ | ||
unsigned numArgs = [_args count]; | ||
NSMutableString* outStr = [NSMutableString stringWithString:format]; | ||
|
||
for (unsigned i=0; i<numArgs; i++) | ||
{ | ||
NSString* str = [NSString stringWithFormat:@"%%%d", i+1]; | ||
[outStr replaceOccurrencesOfString:str withString:[_args objectAtIndex:i] | ||
options:NSLiteralSearch | ||
range:NSMakeRange(0, [outStr length])]; | ||
} | ||
|
||
//replance pauses | ||
[outStr replaceOccurrencesOfString:@"/100/" withString:@"\x1b\\pause=100\\" options:NSLiteralSearch range:NSMakeRange(0, [outStr length])]; | ||
[outStr replaceOccurrencesOfString:@"/500/" withString:@"\x1b\\pause=500\\" options:NSLiteralSearch range:NSMakeRange(0, [outStr length])]; | ||
|
||
return outStr; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
// | ||
// Created by K3A on 5/20/12. | ||
// Copyright (c) 2012 K3A. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSString (SpeakEventsAdditions) | ||
|
||
-(NSString*)stringWithFirstUppercase; | ||
-(NSString*)urlEncodedString; | ||
- (BOOL)doesContainSubstring:(NSString *)substring; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
// | ||
// Created by K3A on 5/20/12. | ||
// Copyright (c) 2012 K3A. All rights reserved. | ||
// | ||
|
||
#import "KStringAdditions.h" | ||
|
||
@implementation NSString (SpeakEventsAdditions) | ||
|
||
-(NSString*)stringWithFirstUppercase | ||
{ | ||
if ([self length] == 0) | ||
return [[self copy] autorelease]; | ||
|
||
NSString* firstCh = [[self substringToIndex:1] uppercaseString]; | ||
return [firstCh stringByAppendingString:[self substringFromIndex:1]]; | ||
} | ||
|
||
-(NSString*)urlEncodedString | ||
{ | ||
NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, | ||
(CFStringRef)self, NULL, CFSTR(":/?#[]@!$&'()*+,;="), kCFStringEncodingUTF8); | ||
return [result autorelease]; | ||
} | ||
|
||
- (BOOL)doesContainSubstring:(NSString *)substring | ||
{ | ||
//If self or substring have 0 length they cannot match | ||
//This can have odd results with NSRange | ||
if([self length] == 0 || [substring length] == 0) | ||
return NO; | ||
|
||
NSRange textRange; | ||
|
||
textRange = [[self lowercaseString] rangeOfString:[substring lowercaseString]]; | ||
|
||
if(textRange.location != NSNotFound) | ||
{ | ||
return YES; | ||
}else{ | ||
return NO; | ||
} | ||
|
||
} | ||
|
||
@end |
Binary file not shown.
Oops, something went wrong.