home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <string.h>
-
- void genlic(unsigned char *name, unsigned char *company, unsigned char *lic)
- {
- int i, len, sum1=0x11, sum2=0x36;
- char tl[18]="*1*63*8582479****";
- char buf1[10];
-
- for (i=0; i<5; i++)
- sum1 += name[i];
-
- itoa(sum1, buf1, 10);
- tl[5] = buf1[0];
- tl[0] = buf1[1];
- tl[2] = buf1[2];
-
- len = strlen(name);
- for (i=0; i<len; i++)
- sum2 += name[i] + 2;
- len = strlen(company);
- for (i=0; i<len; i++)
- sum2 += company[i] + 1;
- sprintf(tl + 13, "%04u", sum2);
-
- strcpy(lic, tl);
- }
-
- void main()
- {
- char name[100]="", company[100]="", lic[100];
-
- printf("Allvue v2.11 License # generator\n");
- printf("\nEnter Name (5 chars min) > ");
- gets(name);
- printf("Enter Company > ");
- gets(company);
- genlic(name, company, lic);
- printf("\nName : %s\n", name);
- printf("Company : %s\n", company);
- printf("License : %s\n", lic);
- printf("\nEnter the above info into your Allvue registration dialog.\n");
- printf("NOTE: strings are case-sensitive\n");
- }