This post contains a POC (Proof of concept) on how to detect if a user is using the same computer as they have previously used before. This can be useful if you want to register a user’s computer for a certain functionality that your website may have. It can also be used to only allow one computer to view private content of a site and has many other applications aside from being really cool!
The way the script works, it has functions to retrieve the following:
- Browser type
- Display width & height, color depth and available height
- The plugins that are installed on the browser
- The operating system the browser is running on
With these four pieces of information you have the option to MD5 hash them, which is what I recommend as it is shorter and easier to store in a database.
Please download the files from here. Two files are needed if you want to use the MD5 encryption.
<script src="https://corephp-corephp.netdna-ssl.com/md5.js"></script> <script src="https://corephp-corephp.netdna-ssl.com/detector.js"></script>
$fingerprint = pstfgrpnt();
To get the values MD5 hashed, simply pass true through as a parameter.
The index.html file on the download includes a simple example.
That is it! Enjoy!