home *** CD-ROM | disk | FTP | other *** search
/ Hackers Toolkit v2.0 / Hackers_Toolkit_v2.0.iso / HTML / archive / Passwd-Cracking / unix / password-gen.c < prev   
C/C++ Source or Header  |  1999-11-04  |  642b  |  37 lines

  1. //http://c5.hakker.com
  2. //Yeah, I know it's riddiculous..
  3.  
  4. #include<stdio.h>
  5. #include<string.h>
  6. #include<stdlib.h>
  7. #include<time.h>
  8.  
  9. int main(void){
  10.  
  11.  int slump,tal,counter=0;
  12.  time_t tid;
  13.  
  14.  slump=time(&tid);
  15.  printf("Press CTRL-C to abort.\n\n");
  16.  printf("password: ");
  17.  
  18.  while(1){  
  19.   srandom(slump); 
  20.   slump=random();
  21.   tal=1+(int) (250.0*random()/(RAND_MAX+1.0));
  22.   if(((tal>47)&&(tal<58))||((tal>64)&&(tal<91))||((tal>96)&&(tal<123))){
  23.    if(counter<8){
  24.     printf("%c",(char)tal);
  25.     counter++;
  26.    } else {
  27.     printf("\nPassword generated.");
  28.     getchar();
  29.     printf("\nPassword: ");
  30.     counter=0;
  31.    }
  32.   }
  33.  }  
  34.  
  35. return(0);
  36. }     
  37.