Skip to content

Instantly share code, notes, and snippets.

@Fuzion24
Fuzion24 / Patching-CVE-2015-1474.md
Last active September 25, 2015 01:21
Patching CVE-2015-1474 -- Remotely exploitable graphics buffer overflow on my Nexus device (N5 5.0.1)

This is a brief guide on how I patched the CVE-2015-1474 for my Nexus 5 - 5.0.1. This involes downloading and building AOSP with the patch for the vuln applied. I have attached a pre-built patched version of libui.so for the Nexus5 5.0.1 in the case you are too lazy to build it yourself (and you trust me).

Building patched libui for your nexus device

repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.1_r1
repo sync -j16

cd frameworks/native
# https://android.googlesource.com/platform/frameworks/native/+/38803268570f90e97452cd9a30ac831661829091%5E%21/#F0
git cherry-pick 2bc5e811a817a8c667bca4318ae98582b0ee6dc6
@TooTallNate
TooTallNate / mouse.js
Created January 30, 2012 05:55
Enable "mouse reporting" with Node.js
// Based on:
// http://groups.google.com/group/nodejs-dev/browse_thread/thread/a0c23008029e5fa7
process.stdin.resume();
process.stdin.on('data', function (b) {
var s = b.toString('utf8');
if (s === '\u0003') {
console.error('Ctrl+C');
process.stdin.pause();
anonymous
anonymous / 8-bit-mix.js
Created December 5, 2011 21:30
8-Bit node.js Buffer Mix
var length = chA.length, // A & B must be the same length
out = new Buffer(length) // faster if you just overwrite one mix channel
for (i=0; i<length; i++) {
if (chA[i] < 128 && chB[i] < 128) {
out[i] = chA[i] * chB[i] / 128;
}
else {
out[i] = 2 * (chA[i]+chB[i]) – chA[i] * chB[i] / 128 – 256;
}
var fs = require('fs');
var path = require('path');
var nodelib = path.resolve('C:\\Users\\tanepiper\\Desktop\\nodelib');
var snippet_path = path.resolve('C:\\Users\\tanepiper\\AppData\\Roaming\\Sublime Text 2\\Packages\\Nodejs\\Snippets');
var createSnippets = function(snippets) {
var i = 0, j = snippets.length;
for(;i<j;i++) {
var item = snippets[i];
@thejh
thejh / bot.coffee
Created August 14, 2011 21:38
My IRC bot, jhbot
coffee = require 'coffee-script'
https = require 'https'
npm = require 'npm'
Irc = require 'irc-js'
cradle = require 'cradle'
{GitHubApi} = require 'github'
request = require 'request'
gitHubApi = new GitHubApi()
githubIssueApi = gitHubApi.getIssueApi()
githubObjectApi = gitHubApi.getObjectApi()
@metal3d
metal3d / nat-traversal.js
Created August 9, 2011 22:16
NAT Traversal with node (0.5.x)
/*
NAT traversal system to let 2 computers behind firewall to communicate.
Example:
Client A (your machine) has public ip 1.1.1.1
Client B (distant machine) has public ip 2.2.2.2
You want to bind port 5556 on your machine
Distant Client want to bind port 5557