Skip to content

Instantly share code, notes, and snippets.

View ElementW's full-sized avatar
🗑️
Currently in a trash can

Céleste Wouters ElementW

🗑️
Currently in a trash can
View GitHub Profile
#!/usr/bin/env python3
import os
"""
Cursed Code.
This code literally patches your kernel memory, proceed at your own risk.
Tested on Ubuntu 17.10 and Arch, x86_64. Should work on other distros, maybe even other architectures!
@soulik
soulik / boot_unpack.lua
Created June 2, 2014 13:20
Android boot image: boot.img unpacker tool written in LuaJIT
local ffi = require 'ffi'
local BOOT_MAGIC = [[ANDROID!]]
local BOOT_MAGIC_SIZE = 8
local BOOT_NAME_SIZE = 16
local BOOT_ARGS_SIZE = 512
local BOOT_EXTRA_ARGS_SIZE = 1024
local t_buf = ffi.new("unsigned char[8]")
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"