Search code examples
pythondjangoencryptioncryptographyuuid

Get client UUID from browser


I want to get client UUID (the user's computer UUID), when user accesses my website. Actually, I will be encrypting something a user can download and it will open in my application only. In my application I am getting UUID on the run and decrypting using this:

os.popen('wmic csproduct get UUID').read()

Everything its working fine, now the only limitation is that I couldn't find any way to get UUID of the client from my website, so that I can encrypt along with some other hashes that my application know and can add as salt and decrypt. My website id developed on Django.

Note

  • User is going to download my application that will be in form of .exe file, can I use some script inside my application to send UUID to my website ?
  • I think I need to write some script that user will download and it will send me the data all the time and then I will allow the user to download, anyone can guide me on this ?
  • I know you can ask what if user changes the system etc. I just want to get UUID for now I have taken care of other things already.
  • For now lets say I want to work on windows only, no Linux or Mac user

Edit

Some folks are getting confused by UUID I mean the "Universal Unique Identifier" of the computer on which a person is accessing my website.


Solution

  • That's not directly possible, because the browser doesn't expose an API for that. That is also not directly possible from Web Extensions.

    Since your users already have your native application installed you can let your setup procedure register a native messaging host with Chrome or Firefox. You can then create an web extension that works solely with your web site querying the native application for the UUID of the host and passing it along to your web site.