From be40a3392874af93c11953f253bcbf21930f5b7e Mon Sep 17 00:00:00 2001 From: caRJ33 Date: Wed, 2 Jan 2019 23:25:15 +0100 Subject: Add 'proper' Windows support Add .exe to .gitignore --- .gitignore | 1 + Makefile | 24 ++++++++++++++++++++++++ main.c | 8 ++++++++ 3 files changed, 33 insertions(+) diff --git a/.gitignore b/.gitignore index 31849ba..74111e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.o /taint-info +*.exe diff --git a/Makefile b/Makefile index 3ab6ba2..b08f044 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,11 @@ CC = gcc +RM = rm +RMFLAGS = -f + +ifeq ($(OS),Windows_NT) + RM = del + RMFLAGS = /F /Q +endif CFLAGS = -c LDFLAGS = @@ -7,6 +14,23 @@ LIBS = -lm OBJS = main.o +.PHONY: all debug release clean + +all: debug + +debug: CFLAGS += -g -Og +debug: LDFLAGS += -g -Og +debug: taint-info + +release: CFLAGS += -O3 -s +release: LDFLAGS += -O3 -s +release: taint-info + +clean: + -$(RM) $(RMFLAGS) $(OBJS) + -$(RM) $(RMFLAGS) taint-info.exe + -$(RM) $(RMFLAGS) taint-info + %.o: %.c $(CC) $(CFLAGS) -o $@ $< diff --git a/main.c b/main.c index 0499553..a2a67b5 100644 --- a/main.c +++ b/main.c @@ -62,6 +62,7 @@ void check_flags(int taintval) { } void check_proc() { +#ifndef _WIN32 char buf[2048]; FILE* fh; size_t size; @@ -85,6 +86,13 @@ void check_proc() { // Check the taint check_flags(taintval); +#endif +#ifdef _WIN32 + printf("Kernel is tainted :(\n"); + printf("Taint value: 133742069\n"); + printf("Taint flags: \n"); + printf("WINDOWS: You are running Windows, you fucking noob.\n"); +#endif } void check_flags_cli(char* flagstr) { -- cgit v1.2.3