diff options
author | Christian Hesse <mail@eworm.de> | 2013-12-23 16:33:25 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-12-23 16:33:25 +0100 |
commit | b8b8d7f7ebca5946723c127ff9bee1eeaa9a94e3 (patch) | |
tree | e332864aad47bd4da41008725e414f8035198c54 /nullshell.c | |
parent | 5b73c2ebfed7b3e0742db5ab96dcaa71447faf8c (diff) | |
download | nullshell-b8b8d7f7ebca5946723c127ff9bee1eeaa9a94e3.tar.gz nullshell-b8b8d7f7ebca5946723c127ff9bee1eeaa9a94e3.tar.zst |
introduce config.h and add some fuzzy output text
Diffstat (limited to 'nullshell.c')
-rw-r--r-- | nullshell.c | 12 |
1 files changed, 10 insertions, 2 deletions
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 <time.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#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.... */ |