diff options
author | toni <matzeton@googlemail.com> | 2013-03-08 18:21:01 +0100 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2013-03-08 18:21:01 +0100 |
commit | 426b0d1883a4c83ba862ec7b3ffed7154a63d494 (patch) | |
tree | 127b691c8de1aa653c469e351b727560c6d65478 /Makefile | |
parent | 664c8f1794db0c1f4ebafab955baaba04fc35ec2 (diff) |
some exploitable modules added
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -1,25 +1,31 @@ RM := rm +CC := gcc +CFLAGS = -Wall -g3 +OCFLAGS = -m32 -mpreferred-stack-boundary=2 -z execstack -fno-stack-protector +BINS = exploit +OBINS = overflow overflow_minimal overflow_function exploit all: exploit overflow exploit: - @echo 'building exploit' - gcc -Wall -g exploit.c -o exploit + @echo 'building exploits' + for file in $(BINS); do \ + $(CC) $(CFLAGS) exploit.c -o exploit; \ + done overflow: - @echo 'building overflow' - gcc -Wall -m32 -mpreferred-stack-boundary=2 -g -fno-stack-protector overflow.c -o overflow - -test: overflow - @if [ -x /usr/bin/python ]; then \ - ./overflow `python -c 'print "A"*5000'`; \ - else \ - echo 'Missing PYTHON; not testing'; \ - fi - @echo 'TEST FAILED: ./overflow not segfaulting' + @echo 'building exploitable binaries' + for file in $(OBINS); do \ + $(CC) $(CFLAGS) $(OCFLAGS) $$file.c -o $$file; \ + done clean: - -$(RM) -f overflow exploit - -@echo ' ' + for file in $(BINS); do \ + $(RM) -f $$file; \ + done + for file in $(OBINS); do \ + $(RM) -f $$file; \ + done + @echo ' ' .PHONY: all clean |