Skip to content

Instantly share code, notes, and snippets.

# Adapted by Ryan Florence (http://ryanflorence.com)
# original by Chris Dinger: http://www.houseofding.com/2009/03/create-an-rss-feed-of-your-git-commits/
#
# Takes one, two, or three arguments
# 1. Repository path (required) - the path to the repository
# 2. The url to put as the <link> for both channel and items
# 3. the repository name, defaults to directory name of the repository
#
# Command line usage:
# ruby gitrss.rb /path/to/repo > feed.rss
@zackdouglas
zackdouglas / netsniff.sh
Created April 22, 2014 13:30
sniff network traffic on a given interface and displays the IP addresses of the machines communicating with the current host (one IP per line)
netsniff () {
sudo tcpdump -i wlan0 -n ip | \
awk '{ print gensub(/(.*)\..*/,"\\1","g",$3), $4, gensub(/(.*)\..*/,"\\1","g",$5) }' | \
awk -F " > " '{print $1"\n"$2}'
}
@zackdouglas
zackdouglas / couldBeNative.js
Created August 22, 2014 16:35
couldBeNative.js
;(function() {
module = module || {};
// Used to resolve the internal `[[Class]]` of values
var toString = Object.prototype.toString;
// Used to resolve the decompiled source of functions
var fnToString = Function.prototype.toString;
// Used to detect host constructors (Safari > 4; really typed array specific)
var reHostCtor = /^\[object .+?Constructor\]$/;
@zackdouglas
zackdouglas / inline-worker.js
Created October 24, 2014 20:01
Inline Web worker
var blob = new Blob([
"onmessage = function(e) { postMessage('msg from worker'); }"]);
// Obtain a blob URL reference to our worker 'file'.
var blobURL = window.URL.createObjectURL(blob);
var worker = new Worker(blobURL);
worker.onmessage = function(e) {
console.dir(e);
};
@zackdouglas
zackdouglas / attach.js
Created April 13, 2015 00:18
Attach and detach a window-wide event listener
javascript:void(function(){var f=function(e){console.log('%o:%o',this,e)},ael='addEventListener',n='click';window[ael](n,f);document[ael](n,f);window._zdf=f;}(window))
@zackdouglas
zackdouglas / view-source.url.js
Created April 13, 2015 00:19
View the source of the current page started from a bookmarklet
javascript:void(document.location='view-source:'+document.location)
@zackdouglas
zackdouglas / add-borders.url.js
Created April 13, 2015 00:21
Put 1px borders on all current elements
javascript: [].forEach.call(document.querySelectorAll("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
@zackdouglas
zackdouglas / test
Created April 26, 2015 04:48
Newline Diff Example
This line will not be included in the diff in the next revision.
This line will be included in the diff in the next revision.
This line was added in the new revision.
<?php
/**
* Currying in PHP 5.2.x for simple variables
* @author Zack Douglas <zack.douglas@wellspringsoftware.net>
*/
/**
* e.g.
* $arr = Array(1, 2, 3);
* $le2 = curry_left('ge', 2);
@zackdouglas
zackdouglas / README.md
Last active September 9, 2015 17:37
Stagefright_CVE-2015-1538-1_Exploit

The Latest on Stagefright: CVE-2015-1538 Exploit is Now Available for Testing Purposes

By zLabs Wednesday, Sep 9 2015 at 08:05

37 465

8  7  585

More than a month has passed since Zimperium first broke the news of zLabs’ VP of Platform Research and Exploitation Joshua J. Drake’s discovery of multiple critical vulnerabilities in Android’s media library – libstagefright. In that time frame, the number and importance of the events that have unfolded is nothing short of amazing. Back in April and May we reported two sets of vulnerabilities to Google, both including multiple with critical severity. In July, we announced our intentions to publish our exploit on August 5th during Black Hat USA. After discussions with ZHA Partners, including both carriers and device manufacturers, we agreed to postpone the release of the exploit until August 24th. Multiple researchers have publicly discussed their own working exploits targeting vulnerabilities within libstagefright. Before we dive into our exploit, let’s rec