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
- Copy the delivered ipa into a directory to work in. | |
- export PlistBuddy="/usr/libexec/PlistBuddy" to get the PlistBuddy tool to your shell. If it is not added, all references to PlistBuddy | |
will need to be written as the full path. | |
- Take the delivered App.ipa and unzip it using the unzip command. This should produce a Payload directory containing the app and its | |
resources. | |
- Enter the command "codesign -d --entitlements :enterprise.plist Payload/PathToApp.app/" This pulls the entitlements out of the app, and | |
prints them to a plist, without a leading "blob" of data. Pay particular attention to the colon before the enterprise.plist file name. |
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 <Foundation/Foundation.h> | |
@interface NSString (Mod97Check) | |
- (BOOL)passesMod97Check; // Returns result of mod 97 checking algorithm. Might be used to check IBAN. | |
// Expects string to contain digits and/or upper-/lowercase letters; space and all the rest symbols are not acceptable. | |
@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
import Foundation | |
import Security | |
private let keychainQueue = dispatch_queue_create("networking.keychain", DISPATCH_QUEUE_CONCURRENT) | |
public class Keychain { | |
private let service: String | |
public init(service: String) { | |
self.service = service | |
} |
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
# Basic Strongswan ikev2 server setup | |
* paltform: atlantic.net ubuntu 14.04 x64 | |
* the commands below are run with root account | |
## Strongswan | |
``` | |
apt-get install strongswan | |
apt-get install iptables iptables-persistent | |
``` |
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
static __attribute__((always_inline)) CCCryptorStatus AES128Run(CCOperation operation, NSData *inData, NSData *key, NSData *__autoreleasing *outData) { | |
CCCryptorStatus status = kCCParamError; | |
if (outData != NULL) { | |
CCCryptorRef cryptor = NULL; | |
//correct key length | |
NSMutableData *correctedKey = [key mutableCopy]; | |
if ([key length] <= kCCKeySizeAES128) { | |
[correctedKey setLength:kCCKeySizeAES128]; |
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
24a25 | |
> "keychain|k=s", | |
156a158,162 | |
> if ( $opt{keychain} ) { | |
> push(@codesign_args, '--keychain'); | |
> push(@codesign_args, $opt{keychain}); | |
> } | |
> | |
268c274 | |
< PackageApplication [-s signature] application [-o output_directory] [-verbose] [-plugin plugin] || -man || -help |
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
/*/../bin/ls > /dev/null | |
COMPILED=${0%.*} | |
clang $0 -o $COMPILED -framework Foundation; | |
$COMPILED; rm $COMPILED; exit; | |
*/ | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) |
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 <Foundation/Foundation.h> | |
#import <Security/Security.h> | |
int main(int argc, const char *argv[]) { | |
NSUserDefaults *arguments = [NSUserDefaults standardUserDefaults]; | |
NSString *file = [arguments stringForKey:@"f"]; | |
NSString *option = [arguments stringForKey:@"o"]; | |
if (!file) { | |
printf("\ |
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
doc = Document.getCurrentDocument() | |
seg = doc.getCurrentSegment() | |
adr = doc.getCurrentAddress() | |
dstStr = Document.ask("Enter destination address:") | |
if dstStr != None: | |
dst = int(dstStr, 16) | |
offset = dst - (adr + 6) | |
after = adr + 6 | |
while seg.getTypeAtAddress(after) == Segment.TYPE_NEXT: | |
after = after + 1 |
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
# This sample script will search for the standard pattern that | |
# identifies a function's prolog, and mark each of them as a procedure | |
doc = Document.getCurrentDocument() | |
# First, we disassemble the whole segment | |
seg = doc.getCurrentSegment() | |
seg.disassembleWholeSegment() | |
addr = seg.getStartingAddress() |
NewerOlder