home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / SCRKM2KG.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-03-26  |  1.5 KB  |  52 lines

  1. // This is the C++ Source Code of my KeyGEN. I hope you like it.
  2. // I've compiled it using Symantec C/C++ 6.11
  3.  
  4. #include <stdio.h>
  5.  
  6. int main()
  7. {
  8. unsigned long i         = 0;
  9. long double RegCodeTemp = 0;
  10. char name[100]          = {0};
  11. char Key[300]           = {0};
  12.  
  13. printf("   ____                     __       __\n");
  14. printf("  /  _/_ _  __ _  ___  ____/ /____ _/ /\n");
  15. printf(" _/ //  ' \\/  ' \\/ _ \\/ __/ __/ _ `/ /\n");
  16. printf("/___/_/_/_/_/_/_/\\___/_/  \\__/\\_,_/_/\n");
  17. printf("   ____                          __          __\n");
  18. printf("  / __ \\___ ___ _______ ___  ___/ /__ ____  / /____\n");
  19. printf(" / /_/ / -_|_-</ __/ -_) _ \\/ _  / _ `/ _ \\/ __(_-<\n");
  20. printf("/_____/\\__/___/\\__/\\__/_//_/\\_,_/\\_,_/_//_/\\__/___/\n\n");
  21.  
  22. for (;;){ 
  23. printf("\nAdrĂ©nalin's CrackMe 2 KeyGEN - d0NE bY TORN@DO in '99\n");
  24. printf("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");
  25. printf("Name:  ");
  26. gets(name);
  27.  
  28. if (strlen(name) <  1) return 0;
  29. if (strlen(name) > 83) printf("ERROR: Name can't be greater than 83 chars!");
  30. else break;
  31. }
  32.  
  33. // add values for name together
  34. for (i = 1; i <= strlen(name); i++)
  35. RegCodeTemp = RegCodeTemp + name[i-1];
  36.  
  37. // multiply RegCodeTemp by 1234567890
  38. RegCodeTemp = RegCodeTemp * 1234567890;
  39.  
  40. // print RegCodeTemp in string (for manipulation)
  41. sprintf(Key, "%.Lf", RegCodeTemp);
  42.  
  43. // the 4th and 9th part of the regcode must be a dash (-)
  44. Key[4-1] = 0x2D;
  45. Key[9-1] = 0x2D;
  46.  
  47. // print out the key
  48. printf("Key:   %s", Key);
  49.  
  50. return 0;
  51. }
  52.