Advertisement
Guest User

Biomechanica@TI

a guest
Oct 5th, 2010
43
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4.  
  5. int main(int argc, char **argv) {
  6.  
  7.     printf("Keygen for Biomechanica keygenme v1.0\n");
  8.     printf("Biomechanica 2010\n\n");
  9.    
  10.     srand(time(0));
  11.  
  12.     if( argc != 2 ) {
  13.         printf("Usage: %s <username>\n", argv[0]);
  14.         return -1;
  15.     }
  16.  
  17.     char *serial = malloc(100), *username = malloc(100);
  18.     int len, cnt, a;
  19.  
  20.     username = argv[1];
  21.    
  22.     len  = strlen(username);
  23.     if( len < 10 ) {
  24.         printf("Username must be atleast 10 characters!\n");
  25.         return -1;
  26.     }
  27.    
  28.     if( len > 32 )
  29.         len = 32;
  30.    
  31.     for( cnt = 0; cnt < len; ++cnt ) {
  32.         a = (int)username[cnt] ^ cnt;
  33.         a %= 10;
  34.         a += 0x30;
  35.         serial[cnt] = a;
  36.     }
  37.  
  38.     for(; cnt < 32; ++cnt ) {
  39.         a = rand();
  40.         a %= 10;
  41.         a += 0x30;
  42.         serial[cnt] = a;
  43.     }
  44.    
  45.  
  46.     memset(serial+8,  0x2d, 1); // memset requires an integer so we can't use the string "-"!
  47.     memset(serial+16, 0x2d, 1);
  48.     memset(serial+24, 0x2d, 1);
  49.        
  50.     printf("Username: %s\n", username);
  51.     printf("Serial:   %s\n\n", serial);
  52.    
  53.     return 0;
  54. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement