Skip to content

Instantly share code, notes, and snippets.

View DHager's full-sized avatar

Darien DHager

  • Seattle, WA
View GitHub Profile
@DHager
DHager / coredump.php
Created December 3, 2015 20:42
Tries to cause a core-dump so that you can test your PHP/Apache/OS configuration to make sure they are being saved
<?php
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
ob_end_flush();
$pid = getmypid();
$secs = 10;
$cmd = "kill -3 $pid";
@DHager
DHager / aoc_day3.py
Created December 3, 2015 21:19
Advent of Code Day 3
from collections import Counter
class Santa:
def __init__(self):
self.position = [0,0]
self.path = [tuple(self.position)]
def move(self, char):
@DHager
DHager / openssl_rc4_poc.py
Created August 4, 2016 00:56
An experiment to try to reproduce part of the "openssl" command line tool's behavior through Python. See blog post: http://technofovea.com/blog/archives/1054
#!/usr/bin/python
import sys
import itertools
import binascii
import StringIO
from Crypto.Hash import SHA, MD5
from Crypto.Cipher import AES, ARC4
from Crypto import Random
from datetime import datetime
from os import path
import sys
import shutil
from PIL import Image
__author__ = 'Darien Hager'
class SteamScreenImport: