Way to recover old stored passwords?

Shig

New member
I haven't played in forever, but I found KoLmafia-13.3.1.exe in a folder and it loaded up, still showing a dropdown of my accounts with saved passwords. Log-in using this version of the client doesn't seem to work, but if the passwords have been stored, are they retrievable somewhere/somehow?

(I don't even have/remember some of the email addresses associated with these accounts.)

Cheers!
 
I think if you put a current version of mafia in the same folder and load it instead, it should find the same configuration/settings/prefference files, and Just Work (tm)?
 
As xKiv points out, you're probably best off updating Mafia to a more recent build. That said...

The passwords are stored in settings/GLOBAL_prefs.txt as saveState.<your username> as a number, after having gone through a couple of encoding steps.

Let's suppose you find saveState.MyPlayerName=24384134996652556355652781064524805561670215427650314403260

You can then use the following snippet in your browser console (e.g. Chrome DevTools or Firefox Web Console) to recover the corresponding password.

decodeURIComponent(24384134996652556355652781064524805561670215427650314403260n.toString(36).split('').map((x, i) => i % 2 ? x : '%' + x).join(''))

(important: the trailing "n" after the number is necessary to make sure JavaScript interprets this as a BigInt, and doesn't start dropping precision after 16 or so digits.)

If you run that snippet, you'll get back "my awesome password".
 
Back
Top