Advertisement
Guest User

Untitled

a guest
May 6th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. int is_correct(uint32_t seed) {
  5. uint8_t hexkey[] = "\xA4\x3D\xF6\xF3\x74";
  6. for (uint32_t i = 0, x = seed; i < 5; ++i) {
  7. x = (214013 * x + 2531011) & 0xFFFFFF;
  8. if (hexkey[i] != (x >> 16)) return 0;
  9. }
  10. return 1;
  11. }
  12.  
  13. int main(int argc, char *argv[]) {
  14. for (uint32_t seed = 0; seed < (1 << 24); seed++)
  15. if (is_correct(seed))
  16. printf("Seed: %03X\n", seed);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement