You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
565 B

CC=gcc
OBJ = number_guesser.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $<
debug: $(OBJ)
$(CC) -o $@ $^ -g
guess: $(OBJ)
$(CC) -o $@ $^
evil: guess
$(CC) -shared -fPIC evil_random.c -o evil_random.so
LD_PRELOAD="$(PWD)/evil_random.so" ./guess
exploit: guess
gcc -ldl -o exploit_scanf.so -fPIC -shared exploit_scanf.c
LD_PRELOAD=$(PWD)/exploit_scanf.so ./guess
shim: guess
gcc -ldl -o find_main_shim.so -shared -fPIC find_main_shim.c
LD_PRELOAD=$(PWD)/find_main_shim.so ./guess
run: guess
./guess
clean:
rm -f *.o *.so guess