Skip to content

Instantly share code, notes, and snippets.

View klmitchell2's full-sized avatar
🎯
Focusing

Kevin Mitchell Jr klmitchell2

🎯
Focusing
View GitHub Profile
@klmitchell2
klmitchell2 / NSSting+Caesar.m
Last active June 15, 2017 00:32
Caesar Cipher written in Objective-C
- (NSString *)caesarCipher:(int)shift {
if (self.length == 0) {
return nil;
}
//no shift, return unencrypted string
if (shift == 0){
return self;
}
@klmitchell2
klmitchell2 / NSString+Pangram.m
Created June 15, 2017 02:57
Objective-C Pangram
- (BOOL)pangram {
NSMutableSet *set = [[NSMutableSet alloc] init];
for (int i = 0; i < self.length; i++) {
if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:i]]) {
[set addObject:[NSString stringWithFormat:@"%c", [self characterAtIndex:i]]];
} else if ([[NSCharacterSet lowercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:i]]) {
- (void)depthFirstTraversal:(int)n {
if (n > self.count-1) {
NSLog(@"end of list");
return;
}
if (n == 1) {
NSLog(@"%@", self[n]);
[self depthFirstTraversal:2 * n];
#!/jb/bin/bash
CYCRIPT_PORT=1337
function help {
echo "Syntax: $0 [-p PID | -P appname] [-l /path/to/yourdylib | -L feature]"
echo
echo For example:
echo " $0 -P Reddit.app -l /path/to/evil.dylib # Injects evil.dylib into the Reddit app"
echo " or"
@klmitchell2
klmitchell2 / frida-test.swift
Created March 29, 2020 16:21
Test function that injects a simple script into a running process via Frida-swift
func testFullCycle() {
let expectation = self.expectation(description: "Got message from script")
class TestDelegate : ScriptDelegate {
let expectation: XCTestExpectation
var messages = [Any]()
init(expectation: XCTestExpectation) {
self.expectation = expectation