diff options
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | netnuke.c | 10 |
2 files changed, 15 insertions, 3 deletions
@@ -1,7 +1,11 @@ CFLAGS=-std=c99 -Wall -pipe -O2 +DEFINES= LFLAGS=-lutil -ltermcap -OUTPUT=netnuke +PACKAGE=netnuke all: - cc -o ${OUTPUT} ${LFLAGS} ${CFLAGS} netnuke.c + gcc $(SVNDEF) -o $(PACKAGE) $(DEFINES) $(CFLAGS) $(LFLAGS) netnuke.c + strip netnuke +clean: + rm netnuke @@ -480,7 +480,8 @@ int filterArg(const char* key, char* value, short flags) int main(int argc, char* argv[]) { - printf("\033[2J"); + /* ANSI clear-screen sequence */ + //printf("\033[2J"); int tok = 0; /* Static arguments that must happen first */ @@ -566,6 +567,13 @@ int main(int argc, char* argv[]) } } + /* Check for root privs before going any further */ + if((getuid()) != 0) + { + fprintf(stderr, "You must be root first, sorry.\n"); + exit(3); + } + int i = 0; int mt = 0; |