forked from oblique/code-injector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 755 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
all: injector
injector: injector.o
gcc $< -o $@
injector.o: injector.c payloads.h
gcc -c $< -o $@
payloads.h: thread_creator_32.bin thread_creator_64.bin
@echo '#ifndef PAYLOADS_H' > payloads.h
@echo '#define PAYLOADS_H' >> payloads.h
@echo >> payloads.h
xxd -i thread_creator_32.bin >> payloads.h
@echo '#ifdef __x86_64__' >> payloads.h
xxd -i thread_creator_64.bin >> payloads.h
@echo '#endif' >> payloads.h
@echo '#endif' >> payloads.h
thread_creator_32.bin: thread_creator_32.o
objcopy -O binary $< $@
thread_creator_64.bin: thread_creator_64.o
objcopy -O binary $< $@
thread_creator_32.o: thread_creator_32.s
as --32 $< -o $@
thread_creator_64.o: thread_creator_64.s
as --64 $< -o $@
clean:
@rm -f injector payloads.h *.o *.bin