From a76cb7ea291fb1ee5c74fd9bc76ab71630fa625a Mon Sep 17 00:00:00 2001 From: toni Date: Fri, 1 Aug 2014 00:43:20 +0200 Subject: - print shellcode --- shellcode/.gitignore | 5 +++++ shellcode/Makefile | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 shellcode/.gitignore (limited to 'shellcode') diff --git a/shellcode/.gitignore b/shellcode/.gitignore new file mode 100644 index 0000000..0d4fce1 --- /dev/null +++ b/shellcode/.gitignore @@ -0,0 +1,5 @@ +simple +simple2 +*.bin +*.map +*.o diff --git a/shellcode/Makefile b/shellcode/Makefile index c35111d..e2b4b69 100644 --- a/shellcode/Makefile +++ b/shellcode/Makefile @@ -2,6 +2,7 @@ RM := rm CC := gcc LD := ld OBJCOPY := objcopy +XXD := xxd CFLAGS = -c -Wall -fpic -Os LDFLAGS = SUBDIR ?= . @@ -13,6 +14,7 @@ all: $(TARGETS) $(CC) $(CFLAGS) -o $@ $< $(LD) $(LDFLAGS) -N -Ttext 0x0 -e _start -Map $(patsubst %.o,%.map,$@) $@ -o $(patsubst %.o,%,$@) $(OBJCOPY) -R .note -R .comment -S -O binary $(patsubst %.o,%,$@) $(patsubst %.o,%.bin,$@) + $(XXD) -i $(patsubst %.o,%.bin,$@) clean: $(RM) -f $(patsubst %.o,%.map,$(TARGETS)) $(patsubst %.o,%.bin,$(TARGETS)) $(patsubst %.o,%,$(TARGETS)) $(TARGETS) -- cgit v1.2.3