From b8b8d7f7ebca5946723c127ff9bee1eeaa9a94e3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 23 Dec 2013 16:33:25 +0100 Subject: introduce config.h and add some fuzzy output text --- nullshell.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'nullshell.c') diff --git a/nullshell.c b/nullshell.c index 113edf7..da2236d 100644 --- a/nullshell.c +++ b/nullshell.c @@ -8,14 +8,17 @@ * by Mario A. Valdez-Ramirez (http://www.mariovaldez.net/) */ +#include #include #include #include -#define SLEEPTIME 10 +#include "config.h" int main(int argc, char **argv) { + time_t now; char *ssh_connection, *ssh_client, *ssh_tty; + char * string = BANNER; /* read environment variables */ ssh_connection = getenv("SSH_CONNECTION"); @@ -37,8 +40,13 @@ int main(int argc, char **argv) { /* print an asterisk every SLEEPTIME seconds */ while (1) { sleep(SLEEPTIME); - putchar('*'); + putchar(*string); fflush(NULL); + if (*string == 0) { + time(&now); + string = ctime(&now); + } else + string++; } /* we should never get here.... */ -- cgit v1.2.3-54-g00ecf