aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index ebe82b5..a5e76c5 100644
--- a/Makefile
+++ b/Makefile
@@ -5,12 +5,14 @@ CFLAGS = -Wall -g3
OCFLAGS = -m32 -mpreferred-stack-boundary=2 -z execstack -fno-stack-protector
TARGETS = $(patsubst %.c,%.o,$(wildcard *.c))
-all: $(TARGETS) msg
+all: $(TARGETS) post-build
-msg:
- @echo "now run:"
- @echo " ./disable_prot.sh"
- @echo " ./exploit"
+post-build:
+ if [ `cat /proc/sys/kernel/randomize_va_space` -eq 0 ]; then \
+ echo "not necessary to run ./disable_prot.sh"; \
+ else \
+ ./disable_prot.sh; \
+ fi
%.o : %.c
$(CC) $(CFLAGS) $(OCFLAGS) -o $(patsubst %.o,%,$@) $<