Advertisement
AnthonyCagliano

Untitled

May 16th, 2023
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #define CEMU_CONSOLE ((char*)0xFB0000)
  2.  
  3. void exit_err(int error){
  4. sprintf(CEMU_CONSOLE, "Exit Code: %u\n", error);
  5. exit(0);
  6. }
  7.  
  8. int main(void)
  9. {
  10. const char *fname = "TIAuthKF";
  11. tinyauth_error_t err;
  12. char *username;
  13. uint8_t *signature;
  14. size_t username_len, signature_len;
  15.  
  16. err = tinyauth_load_key(fname, "<your password here>");
  17. if(err) exit_err(err);
  18.  
  19. err = tinyauth_get_credentials(&username, &username_len, &signature, &signature_len);
  20. if(err) exit_err(err);
  21.  
  22. sprintf(CEMU_CONSOLE, "__TInyAuth Keyfile Extracted Credentials__\n");
  23.  
  24. uint8_t tbuf[username_len + 1];
  25. memset(tbuf, 0, sizeof(tbuf));
  26. memcpy(tbuf, username, username_len);
  27. sprintf(CEMU_CONSOLE, "%s\n", tbuf);
  28.  
  29. for(int i = 0; i < signature_len; i++)
  30. sprintf(CEMU_CONSOLE, "%02X", ((uint8_t*)signature)[i]);
  31. sprintf(CEMU_CONSOLE, "\n");
  32.  
  33. tinyauth_cleanup();
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement