For Albion I wanted to make it as easy as possible for a player to save their progress, without requiring registration. The usual methods are:
- Write to the local hard drive.
- Use the persistence service (muffins).
- Use the browser’s cookies.
All of these have various downsides of some sort. For ‘1’, you need to sign you applet, which prompts the usual scary security dialogs. For ‘2’ this is only available for JNLP applets, which are less robust and less well supported, plus it doesn’t work when you’re running via your IDE. For ‘3’ you have to deal with browser and javascript quirks and incompatibilities, and the user might have them switched off anyway.
So, inspired by panopticlick I decided to see if it was possible to generate a unique fingerprint for a system from within the applet sandbox. Here’s my applet fingerprint:
http://www.triangularpixels.com/Junk/Fingerprint.png
And you can generate your own fingerprint here.
And heres my fingerprint:
rO0ABXNyABlhbGJpb24uY29tbW9uLkZpbmdlcnByaW50t8BDM/LcEnACAAJbAA1mb250SGlzdG9ncmFtdAACW0lMAAdtaW51dGlhdAAPTGphdmEvdXRpbC9NYXA7eHB1cgACW0lNumAmduqypQIAAHhwAAAAGwAAAAAAAAAIAAAABAAAAAsAAAAPAAAABAAAAAQAAAAIAAAAAAAAAAMAAAABAAAABwAAAAkAAAAeAAAAAwAAAAEAAAAHAAAAAAAAAAIAAAATAAAABQAAAAEAAAAEAAAAAgAAAAAAAAAAAAAAAHNyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAABh3CAAAACAAAAAXdAAMZGV2aWNlMFdpZHRodAAEMTkyMHQAD3dpbi5tZW51LmhlaWdodHQAAjE5dAALZGV2aWNlQ291bnR0AAExdAANd2luLm1lbnUuZm9udHQAQGphdmEuYXd0LkZvbnRbZmFtaWx5PVNlZ29lIFVJLG5hbWU9U2Vnb2UgVUksc3R5bGU9cGxhaW4sc2l6ZT0xMl10AA9qYXZhLnZlbmRvci51cmx0ABRodHRwOi8vamF2YS5zdW4uY29tL3QAFGF3dC5tb3VzZS5udW1CdXR0b25zdAABNHQAFWF3dC53aGVlbE1vdXNlUHJlc2VudHQABHRydWV0AAtkZXZpY2UwTmFtZXQACVxEaXNwbGF5MHQADmRldmljZTBSZWZyZXNodAACNTl0AAdvcy5uYW1ldAAJV2luZG93cyA3dAANZGV2aWNlMEhlaWdodHQABDEyMDB0ABx3aW4uZnJhbWUuY2FwdGlvbkdyYWRpZW50c09ucQB+ABV0ABh3aW4ubWVudS5iYWNrZ3JvdW5kQ29sb3J0ACFqYXZhLmF3dC5Db2xvcltyPTI0MCxnPTI0MCxiPTI0MF10AApvcy52ZXJzaW9udAADNi4xdAAXd2luLnhwc3R5bGUudGhlbWVBY3RpdmVxAH4AFXQAFWF3dC5mb250LmRlc2t0b3BoaW50c3QAa3tUZXh0LXNwZWNpZmljIExDRCBjb250cmFzdCBrZXk9MTIwLCBUZXh0LXNwZWNpZmljIGFudGlhbGlhc2luZyBlbmFibGUga2V5PUxDRCBIUkdCIGFudGlhbGlhc2luZyB0ZXh0IG1vZGV9dAAHb3MuYXJjaHQAA3g4NnQAGGF3dC5maWxlLnNob3dIaWRkZW5GaWxlc3EAfgAVdAAMamF2YS52ZXJzaW9udAAIMS42LjBfMTh0ABZhd3QubXVsdGlDbGlja0ludGVydmFsdAADNTAwdAAbd2luLmRlc2t0b3AuYmFja2dyb3VuZENvbG9ydAAbamF2YS5hd3QuQ29sb3Jbcj0wLGc9MCxiPTBddAALamF2YS52ZW5kb3J0ABVTdW4gTWljcm9zeXN0ZW1zIEluYy50ABZhd3QuZmlsZS5zaG93QXR0cmliQ29sdAAFZmFsc2V4
At the moment, the fingerprint is broken down into different sections (as represented by the different colours, left to right):
- Blue is windows settings (font size, colours, etc.)
- Yellow are os properties (name, version, architecture)
- Red is VM properties (vendor, version, url)
- Cyan is display info (number of displays, resolution, etc.)
- Light blue is awt info (desktop hints, click interval, etcl)
- Green is a histogram of all the available font families on a system.
Most of these are stored as hashes, and mapping them onto actual heights for display is somewhat arbitrary but that’s just for visualisation purposes.
I’m still not sure how unique these fingerprints are, so I’d like to get as many people as possible to visit the applet and share their fingerprint so I can tweak the algorithm. I expect fingerprints from similar spec machines to be similar (ie. two fingerprints from Win7 with JRE6 will look pretty close), but for Albion I’ll be tying it with IP as well so the combination should work out to be unique. If anyone’s got any ideas for additional (applet readable!) state then I’m open to suggestions.
I’ll be posting the source too once I’ve gone over it and cleaned it up a bit.
I’m already aware of them but frankly I don’t think they matter for what I’m after here.