Advertisement
KeyStrOke

ts_generator

Jan 27th, 2018
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.12 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char **argv)
  5. {
  6.  
  7.     int x;
  8.  
  9.     // printf("%d", atoi(argv[1]));
  10.     srand(atoi(argv[1]));
  11.  
  12.     int should[16] = {0xF056,
  13.                       0x64E9,
  14.                       0x83F5,
  15.                       0x4E5F,
  16.                       0xA6D5,
  17.                       0xD4FF,
  18.                       0xC5BF,
  19.                       0x9307,
  20.                       0x43F6,
  21.                       0x0D8F,
  22.                       0xC2C7,
  23.                       0x8AFB,
  24.                       0xB0AF,
  25.                       0x7C82,
  26.                       0x664F,
  27.                       0x2043};
  28.     int last = 0;
  29.     int input;
  30.     // printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
  31.     for (int i = 0; i < 16; i++)
  32.     {
  33.         int y = rand();
  34.         // printf("0x%04X", y & 0xffff);
  35.         input = y ^ should[i];
  36.         if (i > 0)
  37.         {
  38.             input = input ^ should[i - 1];
  39.         }
  40.         printf("%04X", (input)&0xffff);
  41.         // printf("\tGenerated: 0x%04X\n", (y ^ last ^ 0xaaaa) & 0xffff);
  42.         // last = y ^ last ^ 0xaaaa;
  43.     }
  44.     return 0;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement