SHARE
TWEET

KGM2 Keygen

redsees Jun 7th, 2014 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4.  
  5.  
  6. int main(int argc,char** argv)
  7. {
  8.     char *name=(char*)malloc(sizeof(char*)*20),*ser=(char*)malloc(sizeof(char*)*20),*temp=(char*)malloc(sizeof(char*)*4);
  9.     int i;
  10.     if(argc!=2)
  11.     {
  12.                    printf("[~]Usage : %s <username>\n\nNote: Username must be between 8 to 11 characters.\n\n",argv[0]);
  13.                    return 0;
  14.     }
  15.     memcpy((char*)name,(char*)argv[1],strlen(argv[1]));
  16.     name[0]=(name[strlen(name)-1]*strlen(name));
  17.     for(i=0;i<8;i++)
  18.     {
  19.                     if(!i)
  20.                           name[i]=((((strlen(name)*strlen(name))*4))^strlen(name))*name[i];
  21.                     else
  22.                           name[i]^=name[i-1];
  23.                     name[i]=(name[i]&0xFF)%0x1A;
  24.                     ser[i]=name[i]+0x41;
  25.     }
  26.     temp[0]='-';
  27.     temp[1]=(((temp[1]=name[7])^strlen(name)*name[6])&0xFF)%0x0A;
  28.     temp[2]=name[8-temp[1]];
  29.     temp[1]+=0x30;
  30.     temp[2]=(((temp[2]^temp[1])&0xFF)%0x0A)+0x30;
  31.     temp[3]=((((temp[3]=name[4])^name[3])&0xFF)%0x0A)+0x30;
  32.     temp[4]='\0';
  33.     strcat(ser,temp);
  34.     printf("\n[~] Serial : %s\n\n",ser);
  35.     return 0;  
  36. }
RAW Paste Data
Want to get better at C?
Learn to code C in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top