Skip to content

Instantly share code, notes, and snippets.

@maxdeliso
maxdeliso / makefile.linux
Created October 14, 2012 04:40
linux console mode hello, world in assembly
probe: probe.o makefile.linux
ld -o probe -e probe probe.o
probe.o: probe.asm makefile.linux
nasm -o probe.o -felf32 probe.asm
clean:
rm -f probe.o probe
@maxdeliso
maxdeliso / .gitignore
Created October 18, 2012 18:13
snequeil
.exports
.o
snequeil
.swp
*~
@maxdeliso
maxdeliso / makefile
Created November 15, 2012 03:35
exploitable
CFLAGS=-g
SS=stackSmash
CC=clang -v
$(SS): $(SS).o
$(CC) $(CFLAGS) $(SS).o -o $(SS)
objdump -xtd ./$(SS) > $(SS).asm
.c.o:
$(CC) -c $<
#include <iostream>
#include <iomanip>
#include <cmath>
/*
* mvc++: cl /EHsc /nologo /GL /Ox pi.cpp /link /LTCG:status /LTCG
*/
int main() {
const int ITER_MAX = 1000000;
@maxdeliso
maxdeliso / w32_desktop_app.cpp
Last active October 14, 2015 00:57
w32 application template
/*
* basic opengl and windows integration
* see: http://www.opengl.org/archives/resources/faq/technical/gettingstarted.htm
* for the proper link flags
* Max DeLiso
*/
#include <Windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
@maxdeliso
maxdeliso / empirical_latency.png
Last active December 10, 2015 20:38
latency graph
empirical_latency.png
@maxdeliso
maxdeliso / currying.scala
Created January 9, 2013 04:31
higher order functions and nested recursive lambdas in Scala
/*
* Max DeLiso <[email protected]>
* 1/8/13
* higher order functions and nested recursive lambdas in Scala
*/
package lesson4
object currying {
CFLAGS=-ansi -g
OUT=uniTSP
SRC=uniTSP.c
CC=gcc
RM=rm
$(OUT): $(SRC)
$(CC) $(SRC) $(CFLAGS) -o $(OUT)
clean:
@maxdeliso
maxdeliso / pebFinder.c
Last active December 11, 2015 06:49
retreiving the PEB (somewhat portably?) on win32
/*
* PEB loader/parser.
*
* This program uses low level OS functionality to examine its
* own memory layout. Some structs were defined manually due
* to their absence in stanard windows header packages.
*/
/* Turn off some unhelpful warnings */
#pragma warning (disable: 4820 4668 4255)
@maxdeliso
maxdeliso / loop.c
Created January 30, 2013 18:26
Singly linked list loop detection.
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
struct sList {
struct sList * next;
int data;
};
struct sList* sList_new();