Advertisement
Guest User

Untitled

a guest
Jun 17th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.53 KB | None | 0 0
  1. /*Works on the old 16-bit version of microtype */
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <stdlib.h>
  5.  
  6. int main() {
  7.    int i;
  8.    char fname[256],buff[26];
  9.    FILE *f;
  10.    while (true) {
  11.       system("cls");
  12.       printf (
  13.          "MicroType Account Cracker - by Jakash3\n\n"
  14.          "Enter microtype data filename: "
  15.       );
  16.       gets(fname);
  17.       f=fopen(fname,"r");
  18.       if (!f) {
  19.          printf("Failed to open file!");
  20.          goto end;
  21.       }
  22.       fseek(f,6,0);
  23.       if (fread(buff,1,26,f)<26) {
  24.         printf("Failed to read file!");
  25.          goto end;
  26.       }
  27.       printf(
  28.          "\nUsername: %s"
  29.          "\nPassword: ",
  30.          buff
  31.       );
  32.       fseek(f,0x2b,0);
  33.       fread(buff,1,16,f);
  34.       for (i=0;i<15;i++) {
  35.          printf("%c",buff[i]^0xAA);
  36.       }
  37.       printf("\nPeriod number: ");
  38.       fseek(f,0x20,0);
  39.       fread(buff,1,1,f);
  40.       printf("%c",(char*)buff[0]);
  41.       freopen(fname,"r+",f);
  42.       if (!f) { goto end; }
  43.       printf (
  44.          "\n\nSelect an option:\n"
  45.          "1) Change username\n"
  46.          "2) Change pasword\n"
  47.          "3) Change period number\n"
  48.          "4) Quit\n\n"
  49.       );
  50.       gets(buff);
  51.       if (!memcmp(buff,"1",1)) {
  52.          printf("Enter new username (max 25): ");
  53.          memset(buff,0,26);
  54.          gets(buff);
  55.          fseek(f,6,0);
  56.          if (fwrite(buff,1,26,f)<26) {
  57.             printf("Failed to set new username!");
  58.          } else {
  59.             printf("Username successfully set.");
  60.          }
  61.          getchar();
  62.       } else if (!memcmp(buff,"2",1)) {
  63.          printf("Enter new password (max 16): ");
  64.          memset(buff,0xAA,16);
  65.          gets(buff);
  66.          for (i=0;i<strlen(buff);i++) {
  67.             buff[i]^=0xAA;
  68.          }
  69.          buff[i]=0xAA;
  70.          fseek(f,0x2b,0);
  71.          if (fwrite(buff,1,16,f)<16) {
  72.             printf("Failed to set new password!");
  73.          } else {
  74.             printf("Password sucessfully set.");
  75.          }
  76.          getchar();
  77.       } else if (!memcmp(buff,"3",1)) {
  78.          printf("Enter new period number: ");
  79.          gets(buff);
  80.          fseek(f,0x20,0);
  81.          if (putc(buff[0],f)==EOF) {
  82.             printf("Failed to set period number!");
  83.          } else {
  84.             printf("Period number successfully set.");
  85.          }
  86.          getchar();
  87.       } else if (!memcmp(buff,"4",1)) {
  88.          fclose(f);
  89.          return 0;
  90.       }
  91.       fclose(f);
  92.    }
  93. end:
  94.    fclose(f);
  95.    printf("\n\nPress Enter to quit. . .");
  96.    getchar();
  97.    return 0;
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement