Skip to content

Instantly share code, notes, and snippets.

View mheistermann's full-sized avatar

Martin Heistermann mheistermann

View GitHub Profile
import binascii
import hashlib
from Crypto.Cipher import AES
import sys
# src: http://permalink.gmane.org/gmane.comp.security.openwall.john.user/5628
# cat ~/.sqlnet.ora
# TRACE_DIRECTORY_CLIENT = /tmp
# TRACE_FILE_CLIENT = HoustonWeHaveAProblem
#!/usr/bin/env python
# encoding: utf-8
# try to find a solution to a subproblem of the Archer ARG
# Author: Martin Heistermann <code()mheistermann.de>
# License: THE BEER-WARE LICENSE (Revision 42):
# Martin Heistermann wrote this software. As long as you retain this notice
# you can do whatever you want with this stuff. If we meet some day, and you
#!/usr/bin/env python
# encoding: utf-8
# try to find a solution to a subproblem of the Archer ARG
# Author: Martin Heistermann <code()mheistermann.de>
# License: THE BEER-WARE LICENSE (Revision 42):
# Martin Heistermann wrote this software. As long as you retain this notice
# you can do whatever you want with this stuff. If we meet some day, and you
#!/opt/sage-6.2-x86_64-Linux/sage -python
import sys
sys.path.insert(1, "/usr/lib/python2.7/dist-packages")
import pexpect
from pexpect import fdpexpect
from sage.all import *
DEBUG = False
#include <iostream>
#include <inttypes.h>
#include <assert.h>
#include <vector>
// brute-force python2's string hash randomization (-R option) given a list
// of pairs (s,hash(s))
// caveat: this doesnt incorporate a xor with the string length (trivial to
// add), thus all given strings must have the same length!
#!/usr/bin/env python3
# encoding: utf-8
# exploit for plaidCTF 2015's 'radhos' challenge
import subprocess
import re
import ast
import shutil
import requests
#include <inttypes.h>
// cbmc -DPREFIX=0 -DSUFFIX=0 -DTARGET=1234 -DLEN=6 collision.c
int main()
{
uint32_t prefix=PREFIX;
uint32_t suffix=SUFFIX;
unsigned char str[LEN];
uint32_t x = prefix;
x ^= str[0] << 7;
#!/usr/bin/env python
# encoding: utf-8
from pwn import *
GDB = 0
LOCAL = 0
filename = "/home/shitcpu/flag"
from strings import stringlist
import re
import json
re_stringaccess = re.compile(r"_\$_447d\[([0-9]+)\]")
def main():
def repl(matchobj):
numstr = matchobj.groups()[0]
idx = json.loads(numstr)
extern crate glium;
use glium::Program;
use glium::program::{ProgramCreationError, ProgramCreationInput};
use glium::backend::Facade;
pub struct ReloadingProgram<'a, F: Facade + 'a> {
current: Option<Result<Program, ProgramCreationError>>,
facade: &'a F,
input: Box<ProgramCreationInput<'a>>,