In short
- Interpreted and bytecode apps (Python, Electron, .NET, Java) are easy to read and patch, so a licence check in their code is easy to remove.
- Encrypt the part that matters (a module, a model, the premium features' code or data) and decrypt it only with a valid licence.
- Pramaan's licence check is a small native library with a C interface, callable from any language.
- The licence is sealed to the customer's TPM and checked offline.
Why scripting-language apps are easy to crack
A Python app ships as readable source or easily decompiled bytecode; an Electron app ships its JavaScript in an archive anyone can unpack; .NET and Java decompile back to near-source. A check like if not licensed: exit() is a one-line edit. Obfuscators help a little; the real fix is to make the valuable part unusable without the licence.
Split the app
Keep the shell of the app (its window, menus, free features) as it is, and move what customers pay for into a part Pramaan encrypts: a Python package, a JavaScript bundle, a .NET assembly, a native library, a model or a data set. Pramaan packages your release with that part as ciphertext, and seals the key that opens it to each customer's computer.
Call the licence check from your language
The check (Pramaan's guard) is a native library with one C function: it verifies the licence offline and, if it holds, hands back the key for the protected part. Every desktop language can call a C function:
| Language | How it calls the guard |
|---|---|
| Python | ctypes or cffi |
| Electron / Node.js | a small native addon (N-API) |
| C# / .NET | [DllImport] (P/Invoke) |
| C / C++ / Rust | link it directly |
| Java | JNI or the Foreign Function API |
With the key, decrypt the protected part in memory and load it: importlib from bytes in Python, new Function or a VM context in Node, Assembly.Load(byte[]) in .NET.
Then sell it
Publish the release from the Pramaan console, set a price and an optional free trial, and list it on Pramaan Marketplace, or issue licences to your own customers directly. The same approach works for Android and iPhone apps.
Questions
How do I add licensing to a Python app?
Encrypt the part of the app customers pay for, and call Pramaan's licence check through ctypes: it verifies the licence offline and returns the key to decrypt that part in memory.
Can an Electron app be copy-protected?
Its plain JavaScript can always be read, so protect the valuable part as an encrypted bundle that only opens with a licence sealed to the customer's computer.
Does it need an internet connection?
No. The check runs on the customer's computer, offline.
Related guides
- How to Protect Software From Piracy (2026 Guide)Practical ways to stop software piracy: why licence keys and checks get cracked, how hardware-bound licences and leak tracing work, and what works offline.
- How to Protect On-Device AI Models From CopyingShip AI models that run on the customer's own computer or phone without handing over the weights: encrypt the model, seal its key to the device, check offline.
- How to Sell Software Online and Get Paid InstantlySell desktop and phone apps online: free trials, offline licences, instant stablecoin payouts, licence resale with royalties, and no licence server to run.
See it working: follow the pictures, browse Pramaan Marketplace, or start free.