Home > other >  unique identifier for USB device
unique identifier for USB device

Time:09-30

i want to add a security feature to my python executable, its a portable program which can be installed on a usb drive, how can i make it so it only starts from the usb on which it was installed, when copied or moved to different usb or PC it should show an error

SYSTEM: windows LANGUAGE: python

i think its possible as i bought a educational package online it was delivered to me in a usb drive with a .exe and other encrypted video which were decrypted on running the .exe and played inside it, i tried copying it to different usb's and in py PC but then it stopped opening, but when i used some programs to create a usb image (.img) and write that image to a different usb it worked

CodePudding user response:

PyUSB is a Python library for interacting with USB drives and it comes with really great and well-written documentation (https://github.com/pyusb/pyusb/blob/master/docs/tutorial.rst) on how to use it. I'd pay special attention to the section titled "Dealing with multiple identical devices", which discusses how you can use a few different attributes of the USB to create a unique identifier.

  • Related