--- ansh/src/ansh3.c 2011/10/04 22:37:46 1.1.1.1 +++ ansh/src/ansh3.c 2011/10/07 13:41:26 1.1.1.1.2.2 @@ -3,14 +3,15 @@ * by Michael Pounov * * $Author: misho $ - * $Id: ansh3.c,v 1.1.1.1 2011/10/04 22:37:46 misho Exp $ + * $Id: ansh3.c,v 1.1.1.1.2.2 2011/10/07 13:41:26 misho Exp $ * *************************************************************************/ #include "global.h" #include "ansh.h" -int Timeout, Verbose, Kill, Crypted = 1; +int Timeout, Verbose, Kill; +u_int Crypted; extern char compiled[], compiledby[], compilehost[]; @@ -39,6 +40,11 @@ main(int argc, char **argv) int h, len; u_short id = ANSH_ID; + srandomdev(); + do { + Crypted = (u_int) random() % UINT_MAX; + } while (!Crypted); + while ((ch = getopt(argc, argv, "hvui:t:")) != -1) switch (ch) { case 't': @@ -95,7 +101,7 @@ main(int argc, char **argv) ConnectL3(h, id, &sa, len); - VERB(1) printf("Finish client.\n"); + VERB(1) printf("\nFinish client.\n"); close(h); return 0; }