|
Bugtraq
mailing list archives
Routing problem - solved
From: newsham () uhunix uhcc hawaii edu (Tim Newsham)
Date: Sun, 2 Oct 1994 08:06:17 -1000
/* characters used to encode 6 bits */
char *pick = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
main()
{
char first[16],second[16],salt[3];
/* pick random salt */
srand(time(0));
salt[0]= pick[(rand()>>10)&0x2f];
salt[1]= pick[(rand()>>10)&0x2f];
salt[2]='\0'; /* not necessary */
/* get string */
strcpy(first,getpass("Password: "));
strcpy(second,getpass("Again: "));
if(strcmp(first,second)!=0) {
printf("Passwords not the same both times.\n");
exit(1);
}
/* output */
printf("Password string: %s\n",crypt(first,salt));
return(0);
}
By Date
By Thread
Current thread:
- Routing problem - solved Tim Newsham (Oct 02)
|