Skip to content

Instantly share code, notes, and snippets.

View mm-ast-refactor-talk.go
package main
import (
ccbrown /
Created Apr 19, 2016 — forked from jas-/
PHP stream handler w/ support for multiple files over PUT
* stream - Handle raw input stream
* LICENSE: This source file is subject to version 3.01 of the GPL license
* that is available through the world-wide-web at the following URI:
* If you did not receive a copy of
* the GPL License and are unable to obtain it through the web, please
ccbrown / extract_palindromes.cpp
Last active Feb 13, 2016
View extract_palindromes.cpp
#include <gsl.h>
#include <omp.h>
#include <thread>
#include <vector>
#include <sys/stat.h>
using namespace std::literals;
ccbrown / rop-osx.cpp
Last active Sep 20, 2015
An example ROP payload for OSX.
View rop-osx.cpp
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <string>
// the address that /usr/lib/system/libdyld.dylib is loaded to
// this is randomized on bootup and can be read from lldb via `image list`
// you can set it here or you can pass it as an argument
uint64_t gDyldDylibAddress = 0;
ccbrown / DumpHex.c
Last active May 5, 2021
Compact C Hex Dump Function w/ASCII
View DumpHex.c
#include <stdio.h>
void DumpHex(const void* data, size_t size) {
char ascii[17];
size_t i, j;
ascii[16] = '\0';
for (i = 0; i < size; ++i) {
printf("%02X ", ((unsigned char*)data)[i]);
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') {
ascii[i % 16] = ((unsigned char*)data)[i];