Skip to content

Instantly share code, notes, and snippets.

View bored-engineer's full-sized avatar

Luke Young bored-engineer

View GitHub Profile
2011-11-10 16:54:15.051 node[2145:707] -[NSKeyedUnarchiver count]: unrecognized selector sent to instance 0x7fe450499c60
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
NSInvalidArgumentException: -[NSKeyedUnarchiver count]: unrecognized selector sent to instance 0x7fe450499c60
at Function.msgSend (/Users/Luke/Projects/Archiver/node_modules/NodObjC/id.js:105:21)
at id (/Users/Luke/Projects/Archiver/node_modules/NodObjC/id.js:70:15)
at Object.<anonymous> (/Users/Luke/Projects/Archiver/test.js:9:46)
at Module._compile (module.js:432:26)
@bored-engineer
bored-engineer / prepare.sh
Created December 4, 2011 18:09
Cross-compile settings for node.js
#! /bin/bash
unset CPATH
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset OBJC_INCLUDE_PATH
unset LIBS
unset DYLD_FALLBACK_LIBRARY_PATH
unset DYLD_FALLBACK_FRAMEWORK_PATH
@class EXApplication : UIApplication {
}
- tableView:table numberOfRowsInSection:section {
return 2;
}
- tableView:table cellForRowAtIndexPath:index {
var cell = [new UITableViewCell initWithStyle:UITableViewCellStyleDefault reuseIdentifier:"cell"];
[cell setText:([index row] == 0 ? "test" : "help")];
@bored-engineer
bored-engineer / Tweak.xm
Created December 12, 2011 22:37
Hook webViewDidFinishLoad via theos
#import <UIKit/UIKit.h>
%hook UIWebBrowserView
- (void)webViewDidFinishLoad: (UIWebView *)webView{
//NSLog(@"URL = %@",[webView stringByEvaluatingJavaScriptFromString:@"window.location"]);
%log;
%orig;
}
%end
@bored-engineer
bored-engineer / apt-check.js
Created January 29, 2012 01:18
Test script to list available packages
//Require exec from child processes
var exec = require('child_process').exec;
//List the packages
exec("apt-get --just-print upgrade", function (error, stdout, stderr) {
//Package list
var packages = {}
//Split at each line
stdout = stdout.split("\n");
//for each line
@bored-engineer
bored-engineer / test.sh
Created January 29, 2012 20:12
sbalert sample script
#!/bin/bash
sbalert -t "sbalert" -m"This is a test alert." -d"Button 1" -a"Button 2" -o "Cancel"
result=$?;
if [[ "$result" == "0" ]]; then
echo "Button 1 was pressed"
elif [[ "$result" == "1" ]]; then
echo "Button 2 was pressed"
@bored-engineer
bored-engineer / Tweak.xm
Created February 8, 2012 00:10
Backdoor unlock.
@interface SBAwayController : NSObject
+ (id)sharedAwayController;
- (void)unlockWithSound:(BOOL)arg1;
- (BOOL)handleMenuButtonDoubleTap;
- (BOOL)isPasswordProtected;
@end
static BOOL bypass = NO;
%hook SBAwayController
@bored-engineer
bored-engineer / Readme
Created February 18, 2012 22:34
Telesphoreo build process on a Mac
Telesphoreo on OS X
=======
### Run saurik's Telesphoreo repo on OS X
Prerequisites
------------
* [Xcode][http://itunes.apple.com/us/app/xcode/id448457090?mt=12]
* [Homebrew][http://mxcl.github.com/homebrew/]
@bored-engineer
bored-engineer / Assignment.java
Created November 6, 2012 02:08
GroundGrades v1.0
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.innoying;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
//Import the request module, used to pull the manual from pico's site
var request = require('request');
//Request the manual
request('https://picoctf.com/problems/manual.txt', function (error, response, body) {
//Make sure we were actaully successful
if (!error && response.statusCode == 200) {
console.log(crypt(body, parseInt(process.argv[2])));