Advertisement
saleks28

tsuib1_restore_secret

Jan 30th, 2021
900
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char **argv)
  5. {
  6.     const unsigned char a6g1ecpknCn18gE[] = {"6G1ECPKN>CN18G;ED8RQD:=7:@;7MTEDQAK2SGM5:IHNQ>AEM2"};
  7.     const unsigned char a22233301232120[] = { "22233301232120101011320313033011000313301133003212" };
  8.     unsigned char secret1[38] = { 0x53, 0x8D, 0x51, 0x65, 0x72, 0x52, 0x98, 0x18, 0xA4, 0x65, 0xA7,
  9.                                0x6E, 0x61, 0x62, 0x9D, 0x64, 0x37, 0x36, 0x72, 0x14, 0x08, 0x44,
  10.                                0x73, 0x6D, 0x37, 0x5D, 0x64, 0x2E, 0x31, 0x07, 0x63, 0x34, 0x1A,
  11.                                0x1B, 0x18, 0x17, 0x38};
  12.     unsigned char secret2[38] = { 0x53, 0x8D, 0x51, 0x65, 0x72, 0x52, 0x98, 0x18, 0xA4, 0x65, 0xA7,
  13.                            0x6E, 0x61, 0x62, 0x9D, 0x64, 0x37, 0x36, 0x72, 0x14, 0x08, 0x44,
  14.                            0x73, 0x6D, 0x37, 0x5D, 0x64, 0x2E, 0x31, 0x07, 0x63, 0x34, 0x1A,
  15.                            0x1B, 0x18, 0x17, 0x38 };
  16.     int v6 = 0;
  17.     do {
  18.         int v7 = a6g1ecpknCn18gE[v6] - 48;
  19.         int v3 = a22233301232120[v6] - 48;
  20.         if (v3 == 1)
  21.         {
  22.             secret1[v7] ^= 0x2Fu;
  23.             secret2[v7] ^= 0x2Fu;
  24.  
  25.         }
  26.         else if (v3 <= 1)
  27.         {
  28.             if (a22233301232120[v6] == 48)
  29.             {
  30.                 ++secret1[v7];
  31.                 ++secret2[v7];
  32.  
  33.             }
  34.         }
  35.         else if (v3 == 2)
  36.         {
  37.             secret1[v7] -= 51;
  38.             secret2[v7] -= 51;
  39.  
  40.         }
  41.         else if (v3 == 3)
  42.         {
  43.             secret1[v7] = secret1[v7] * 2;
  44.             secret2[v7] = secret2[v7] * 2 + 1;
  45.  
  46.         }
  47.         ++v6;
  48.     } while (v6 <= 50);
  49.     secret1[37] = 0;
  50.     secret2[37] = 0;
  51.     printf("%s\n", secret1);
  52.     printf("%s\n", secret2);
  53.     return 0;
  54. }
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement