diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | funcjmp_ext_x86.c | 3 | ||||
-rw-r--r-- | funcjmp_simple_x86.c (renamed from funcjmp_simple.c) | 3 |
4 files changed, 10 insertions, 7 deletions
@@ -6,7 +6,5 @@ overflow_tcp overflow_tcp_x64 sc-test sc-test_x64 -funcjmp_simple -funcjmp_ext +funcjmp_simple_x86 funcjmp_ext_x86 -format @@ -11,7 +11,7 @@ X64_FLAGS = -m64 -mpreferred-stack-boundary=4 SOURCES = $(wildcard *.c) TARGETS = $(patsubst %.c,%,$(SOURCES)) -all: $(TARGETS) shellcode crypter +all: $(TARGETS) overflow_x64 overflow_tcp_x64 sc-test_x64 shellcode crypter main: $(TARGETS) @@ -26,9 +26,8 @@ crypter: % : %.c $(CC) $(CFLAGS) $(X86_FLAGS) $(OCFLAGS) -o $@ $< -ifeq ($(LBITS),64) - -$(CC) $(CFLAGS) $(X64_FLAGS) $(OCFLAGS) -o $@_x64 $< -endif +%_x64 : %.c + $(CC) $(CFLAGS) $(X64_FLAGS) $(OCFLAGS) -o $@ $< rebuild: clean all diff --git a/funcjmp_ext_x86.c b/funcjmp_ext_x86.c index 9bf20f4..46e76bd 100644 --- a/funcjmp_ext_x86.c +++ b/funcjmp_ext_x86.c @@ -1,6 +1,9 @@ #include <stdio.h> #include <stdlib.h> +#ifndef __i386 +#error "Unsupported Architecture" +#endif #define INTEL_ASM(_asm_str) asm volatile(".intel_syntax noprefix"); \ asm volatile(_asm_str); \ diff --git a/funcjmp_simple.c b/funcjmp_simple_x86.c index 97db760..5291788 100644 --- a/funcjmp_simple.c +++ b/funcjmp_simple_x86.c @@ -1,6 +1,9 @@ #include <stdio.h> #include <stdlib.h> +#ifndef __i386 +#error "Unsupported Architecture" +#endif #define INTEL_ASM(_asm_str) asm volatile(".intel_syntax noprefix"); \ asm volatile(_asm_str); \ |