home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / KEYGE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1999-07-20  |  1.2 KB  |  50 lines

  1. /*This keygen is made by tarq, mainly for the reason to increase my coding */
  2. /*skills in c, and also to show other newbies how a typical keygen can be*/
  3. /*done. I wont explain how i found all the procedures, since e_bliss has */
  4. /*done a very nice tut already. This was compiled on turbo c++ 4.5 */
  5. /*Thanks to all guys in #cracking4newbies and #c */
  6.  
  7. /*note: replace the "." with a "," if your generated code includes/*
  8. /*decimals./*
  9.  
  10. #include <stdio.h>
  11.  
  12.     char name[100],buffer[80];
  13.     double test;
  14.     long nummer;
  15.  
  16.     int main(void)
  17. {
  18.  
  19.  
  20.     printf("\nEnter name: ");
  21.     scanf("%s",&name);                   /*get name*/
  22.  
  23.     printf("\nEnter reg number: ");
  24.     scanf("%ld",&nummer);             /*get reg number*/
  25.  
  26.     test = 0;
  27.     test =(123456789*2);
  28.  
  29.     test = test/nummer;
  30.  
  31.     test = test+12;
  32.  
  33.     sprintf(buffer, "%ld", nummer);   /*to be able to use the strlen funktion/*
  34.                                                  /*we need to put the numbers into a char/*
  35.                                                  /*variable*/
  36.  
  37.     test = test/(strlen(buffer));     /*strlen checks how many numbers that
  38.                                                  /*has been entered*/
  39.  
  40.     test = test*(strlen(name));
  41.  
  42.     printf("\n\n%2.15g",test);         /*thanks to _y for showing me how set*/
  43.                                                  /*lengt of number showed*/
  44.  
  45.     getch();
  46.     exit(0);
  47. }
  48.  
  49.  
  50.