- Binary search through revision history
- You may not need it often
- Saves a ton of time!
// Xcode 6 - Empty Application Template | |
// | |
// 1. Create a new "Single View Application" template. | |
// 2. Delete said files "Main.storyboard", "ViewController.h", "ViewController.m". | |
// 3. Remove the "Main storyboard file base name" entry from "Info.plist" file. | |
// 4. Open AppDelegate.m, and edit applicationDidFinishLaunchingWithOptions with this snippet. | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; |
- (void)viewDidLoad | |
{ | |
UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] | |
initWithItems:[NSArray arrayWithObjects: | |
@"Segm 1", | |
@"Segm 2", | |
@"Segm 3", | |
@"Segm 4", nil]]; | |
[segmentedControl setFrame:CGRectMake(20, 20, [UIScreen mainScreen].bounds.size.width - 40, 30)]; | |
[segmentedControl setSelectedSegmentIndex:0]; |
NSCoding | |
=== |
Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.
This document is mainly targeted toward iOS development, but definitely applies to Mac as well.
NSString *foo = @"bar";
#NoEnv | |
#SingleInstance force | |
SendMode Input | |
Numpad0::Suspend ; | |
Lbutton:: | |
Loop | |
{ | |
GetKeyState, state, Lbutton, P | |
if state=U |
Since the Meterpreter provides a whole new environment, we will cover some of the basic Meterpreter commands to get you started and help familiarize you with this most powerful tool. Throughout this course, almost every available Meterpreter command is covered. For those that aren’t covered, experimentation is the key to successful learning.
The ‘help‘ command, as may be expected, displays the Meterpreter help menu.
meterpreter > help
The msfconsole has many different command options to chose from. The following are a core set of Metasploit commands with reference to their output.
https://www.offensive-security.com/wp-content/uploads/2015/04/msfconsole-core-commands.png msfconsole core commands | Metasploit Unleashed
back Move back from the current context
banner Display an awesome metasploit banner
cd Change the current working directory
require "openssl" | |
require "base64" | |
include Base64 | |
plain_text = "This is the song that never ends, it goes on and on my friends." | |
cipher = OpenSSL::Cipher::AES128.new(:CBC) | |
cipher.encrypt | |
key = cipher.random_key |
require "openssl" | |
require "digest" | |
def aes128_cbc_encrypt(key, data, iv) | |
key = Digest::MD5.digest(key) if(key.kind_of?(String) && 16 != key.bytesize) | |
iv = Digest::MD5.digest(iv) if(iv.kind_of?(String) && 16 != iv.bytesize) | |
aes = OpenSSL::Cipher.new('AES-128-CBC') | |
aes.encrypt | |
aes.key = key | |
aes.iv = iv |