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
uint64_t offset = section->offset; | |
struct segment_64 *text_segment = (struct segment_64 *)text_segment_pointer; | |
uint64_t addr_offset = section->addr - text_segment->vm_addr; | |
if (section->offset != addr_offset) { | |
offset = addr_offset; | |
} | |
uint64_t offset = section->offset; | |
struct segment_32 *text_segment = (struct segment_32 *)text_segment_pointer; | |
uint64_t addr_offset = section->addr - text_segment->vm_addr; |
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
#Instead of building everything manually, you could use this script. Just open Terminal and write chmod 755, press the space bar and then drag this file in. | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd "$DIR" | |
echo "Compiling load_panic_image.c" | |
gcc load_panic_image.c -o load_panic_image | |
echo "Finished compiling load_panic_image.c" | |
echo "Compiling panic_test.c" | |
gcc panic_test.c -o panic_test | |
echo "Finished compiling panic_test.c" | |
echo "Done! Newly compiled commands can be found at $DIR" |
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
// | |
// KBCollectionExtensions.h | |
// | |
// Created by Guy English on 25/02/08. | |
// Copyright 2008 Kickingbear. All rights reserved. | |
// | |
#import <Cocoa/Cocoa.h> | |
/* |
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
/* | |
* Dodgy POC for my CVE-2018-4150 bug - @cmwdotme | |
* | |
* Bad locking lets you use BIOCSDLT and race BIOCSBLEN to increase the length without | |
* increasing/reallocating the buffer.. which lets you overflow ;) Should work up to iOS 11.2.6 | |
* | |
*/ | |
#include <fcntl.h> | |
#include <pthread.h> |
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
// Author: janos.tolgyesi@gmail.com | |
// License: BSD | |
#import <Foundation/Foundation.h> | |
@interface TJIntegerArray : NSObject <NSFastEnumeration> | |
{ | |
NSInteger* _array; | |
} |
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
// | |
// String+AE.swift | |
// Aepryus | |
// | |
// Created by Joe Charlier on 11/20/17. | |
// Copyright © 2017 Aepryus Software. All rights reserved. | |
// | |
import Foundation |
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
extension Dictionary { | |
public func map<T: Hashable, U>(@noescape transform: (Key, Value) -> (T, U)) -> [T: U] { | |
var result: [T: U] = [:] | |
for (key, value) in self { | |
let (transformedKey, transformedValue) = transform(key, value) | |
result[transformedKey] = transformedValue | |
} | |
return result | |
} | |
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
// | |
// GrowingTextView.swift | |
// https://gist.github.com/Bogidon/cc0c9ae6f041413c39fb0ff146ad1b18 | |
// | |
// Created by Bogdan Vitoc on 02/22/2017. | |
// Distributed under the MIT License: https://gist.github.com/Bogidon/cc0c9ae6f041413c39fb0ff146ad1b18#file-license | |
// | |
import UIKit |
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
import sys | |
import numpy | |
import cv2 | |
def comic(img): | |
# do edge detection on a grayscale image | |
gray = cv2.cvtColor(img, cv2.COLOR_BGRA2GRAY) | |
edges = cv2.blur(gray, (3, 3)) # this blur gets rid of some noise |
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
<?php | |
/* | |
Author | |
====== | |
Author: Cathal Garvey. | |
Website: http://cgarvey.ie/ | |
Help/Details Page: http://cgarvey.ie/blog/archive/2013/01/23/manually-generating-salted-hashed-wordpress-passwords/ | |
Copyright |
OlderNewer