Skip to content

Instantly share code, notes, and snippets.

Hack the planet!

David Buchanan DavidBuchanan314

Hack the planet!
Block or report user

Report or block DavidBuchanan314

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
DavidBuchanan314 /
Last active Jan 24, 2020
A deliberately terse AES128 implementation in pure python. Functions taken from, comments removed, put into a single file, and minified.
def xor_bytes(a, b):
return bytearray([ai^bi for ai, bi in zip(a, b)])
def ff_divmod(r, b, q=0):
while True:
diff = r.bit_length() - b.bit_length()
if diff < 0: break
q ^= 1 << diff
r ^= b << diff
return q, r
View crash_chrome.txt
View oeminfo.xml
<BODY type="LICENSE" version="2.0">
<OBJECT type="OEM-Certificate">
<ID type="MS-GUID">{67DB85BE-8627-47A3-B13A-FE3C6C63AE0F}</ID>
View dell_axim_x3_romdump.cpp
#include "stdafx.h"
static unsigned char *rom = (unsigned char *) 0x80000000L;
const size_t rom_size = 0x4000000, block_size = 0x10000;
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
import random
import time
def cursed(x):
return format(x, "b").count("1") % 2
def woke(x):
while x > 1:
midpoint = x.bit_length()//2
mask = (1<<midpoint)-1
import sys
import os
import signal
if len(sys.argv) != 2:
print("USAGE: python3 {} PID".format(sys.argv[0]))
print("(root privs may be required)")

Keybase proof

I hereby claim:

  • I am davidbuchanan314 on github.
  • I am retr0id ( on keybase.
  • I have a public key ASB6O_-BfLaLrW9ng0jX25RMP-G7gg-GoRAVlUQu7ayqnQo

To claim this, I am signing this object:

View nopmark.c
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/time.h>
const size_t nop_len = 8L * 1024 * 1024 * 1024; // 8GiB
double time_double()
This script sets up the bare minimum needed to get a Nintendo Switch console
to connect to a wifi network, without an actual internet connection.
- A DNS server that points every record to the host running the server
- An HTTP server that responds with the `X-Organization: Nintendo` header.
This script must be run as root to acquire the permissions to listen on the
relevant ports.
DavidBuchanan314 /
Last active Apr 8, 2019
PoC web directory scanner using asyncio. It's fast. NOTE: This does not follow any particular HTTP spec and is probably very broken. AIOHTTP would be a more reliable solution, but in my tests it was a lot slower...
import asyncio
from urllib.parse import quote
# dirb time: 1m36.7s
# 32 workers: 3.6s
async def scan_worker(queue):
while True:
You can’t perform that action at this time.