generate_server.c 458 B

123456789101112131415161718192021222324
  1. // Algorithm the same as used in enctypex_decoder by Luigi Auriemma, just in an easy to use single program.
  2. int main(int argc, char **argv)
  3. {
  4. int i = 0;
  5. unsigned int server = 0;
  6. if(argc != 2)
  7. {
  8. printf("usage: %s servername\n", argv[0]);
  9. }
  10. for(i = 0; i < strlen(argv[1]); i++)
  11. {
  12. unsigned char c = tolower(argv[1][i]);
  13. server = c - (server * 0x63306ce7);
  14. }
  15. server %= 20;
  16. printf("%s.ms%d.nintendowifi.net", argv[1], server);
  17. return 0;
  18. }