aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--netnuke.c10
2 files changed, 15 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 6676c01..578abf1 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/netnuke.c b/netnuke.c
index 7983a08..9e81cf7 100644
--- a/netnuke.c
+++ b/netnuke.c
@@ -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;