Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char **argv)
- {
- int x;
- // printf("%d", atoi(argv[1]));
- srand(atoi(argv[1]));
- int should[16] = {0xF056,
- 0x64E9,
- 0x83F5,
- 0x4E5F,
- 0xA6D5,
- 0xD4FF,
- 0xC5BF,
- 0x9307,
- 0x43F6,
- 0x0D8F,
- 0xC2C7,
- 0x8AFB,
- 0xB0AF,
- 0x7C82,
- 0x664F,
- 0x2043};
- int last = 0;
- int input;
- // printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
- for (int i = 0; i < 16; i++)
- {
- int y = rand();
- // printf("0x%04X", y & 0xffff);
- input = y ^ should[i];
- if (i > 0)
- {
- input = input ^ should[i - 1];
- }
- printf("%04X", (input)&0xffff);
- // printf("\tGenerated: 0x%04X\n", (y ^ last ^ 0xaaaa) & 0xffff);
- // last = y ^ last ^ 0xaaaa;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement