News & Education Blog

Hardcore Javascript browser & computer fingerprinting

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="/md5.js" type="text/javascript"></script>
<script src="/detector.js" type="text/javascript"></script>

To get all of the above information about the browser in one neat string with separators, call this JavaScript function:

$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!

This entry was posted in Javascript, Operating System. Bookmark the permalink.

9 Responses to Hardcore Javascript browser & computer fingerprinting

  1. metalaureate says:

    Marvellous, thank you, just what I was looking for. Spooky timing. Works like a charm.

  2. jesse says:

    Can you please relink the script source? I’m getting a 404 error… This looks very promising for something I’m attempting. Thanks!

  3. Rafael Corral says:

    jesse,

    I updated the link on the post.

    Enjoy.

  4. King of ♣ says:

    Hi,

    I have seen a little error on the index.html file. To make components detection on IE, the script tag must be include befroe to close the tag.

    Whatever, very usefull script, thanks.

  5. Pingback: Step-thru on my WordPress plugin StaRate | Jason Fang's Simple Site

  6. Disabled people Dating says:

    Howdy! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My blog looks weird when browsing from my apple iphone. I’m trying
    to find a theme or plugin that might be able to resolve this problem.
    If you have any suggestions, please share.
    Appreciate it!

  7. Please take a look at http://jetpack.me/ and you will be able to set up your mobile site with ease using this system.

    Best,
    Michael Pignataro

  8. Sundeep says:

    Hi,

    Can you please relink the download link.
    Regards,
    Sundeep Dangol

  9. magicman says:

    This is now fixed. Let us know if you need anything else.

    Best,
    Michael Pignataro
    VP of Operations

Leave a Reply