I have generated a .exe of a Python script. I wish to give this software as a demo version to few of clients.

For the same I want to bind the software to a particular PC. i.e. If I install the software one a particular PC, the client should not be able to copy the .exe from his PC to some other PC and use the software.

What are the ways in which I can ensure this. I have heard that binding the MAC address of the PC with software is one of the options. Please correct me if I am wrong or suggest other methodologies of achieving the desired task.

closed as too broad by user40980, gnat, durron597, user22815, user53019 Jun 16 '15 at 21:35

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • You do realize they can install the thing on a fully virtual machine and then just copy it along with the executable? – Ordous Jun 11 '15 at 16:34
  • It will not be installed on a virtual machine as, installation will be done by us. @Ordous – Rahul Patel Jun 11 '15 at 16:37
  • Then charge the price low enough so that it's easier for them to buy another copy than to learn (or to hire someone) to make a copy in a virtual machine. – 9000 Jun 11 '15 at 16:47
  • @RahulPatel any machine you install it on to, I can clone (mac address and all). – user40980 Jun 11 '15 at 16:52

Short version: It can't be done, so don't bother.

Long version: What you're trying to do has been tried ever since the invention of the floppy disc. They call it "copy protection" or more recently "DRM", and it does not work, never has, and never can. Trying to make bytes that are not copyable is like trying to make water that's not wet. This doesn't keep people from putting tons of research into it, generally as an anti-piracy scheme.

Microsoft, who spends more money on R&D each quarter than many of us will see in our entire lives, put a huge amount of work into it for Windows 8. A working crack was available before Windows 8 was even released to the public. If they can't make it work, with all those resources available, do you really think you even have the slightest chance?

Copying stuff that "shouldn't" be copied is not a technology issue; it's a social issue. You and the person doing the copying disagree on whether or not it should be copied. There's a well-established system for dealing with social issues of this sort: contract law. Get them to sign a contract that places liability on them if they use it in certain ways, and that will do more than all the technical attempts to make bytes un-copyable in all the world.


This is an ages-old problem. The only working solution is to make your executable crucially depend on a piece of hardware the user does not control. This is usually either a networked server you control, or a hardware dongle. Both should do some non-trivial and vital computations, else the dependency can be short-circuited using a debugger and then a patch.

Usually this approach works reasonably well only if you make substantial money form each installation (to offset the cost of the dongle), or have quite many installations (to offset the cost of creating and maintaining the server).

If you want your demo version stay demo, actually remove some important code from it, and build a separate binary. Often demos allow to do everything but not to save the results.

Also, Python programs are not particularly easy to protect from reverse-engineering and modification.

In short, forget the technical means, rethink your sales model.

Not the answer you're looking for? Browse other questions tagged or ask your own question.